# Command cp error: cp: omitting directory 'move\_bb8\_square.py'

**URL:** <https://get-help.theconstruct.ai/t/command-cp-error-cp-omitting-directory-move-bb8-square-py/23276>\
**Category:** Linux Basics For Robotics\
**Tags:** error\
**Created:** [March 23, 2023, 8:04am UTC](https://get-help.theconstruct.ai/t/command-cp-error-cp-omitting-directory-move-bb8-square-py/23276 "2023-03-23T08:04:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tanmay26](https://get-help.theconstruct.ai/letter_avatar_proxy/v4/letter/t/bc79bd/32.png) [@tanmay26](https://get-help.theconstruct.ai/u/tanmay26)\
**Post date:** [March 23, 2023, 8:04am UTC](https://get-help.theconstruct.ai/t/command-cp-error-cp-omitting-directory-move-bb8-square-py/23276/1 "2023-03-23T08:04:42Z")

</div>

Hello there, I am typing this copy command: cp move\_bb8\_square.py move\_bb8\_square\_copy.py and the path I am on is: cd ~/catkin\_ws/src/linux\_course\_files/move\_bb8\_pkg/my\_scripts and yet I am getting this error: cp: omitting directory ‘move\_bb8\_square.py’  
What I might be doing wrong?  
Thank you!

---

<div class="post-metadata">

**Author:** ![girishkumar.kannan](https://get-help.theconstruct.ai/user_avatar/get-help.theconstruct.ai/girishkumar.kannan/32/6994_2.png) [@girishkumar.kannan](https://get-help.theconstruct.ai/u/girishkumar.kannan)\
**Post date:** [March 23, 2023, 8:37am UTC](https://get-help.theconstruct.ai/t/command-cp-error-cp-omitting-directory-move-bb8-square-py/23276/2 "2023-03-23T08:37:46Z")

</div>

Hi @tanmay26 ,

Welcome to this Community!

You seem to be making a copy of an existing file within the same directory.  
Your command is correct, but since you say it gives an error try this way instead:

```bash
# use ./ to denote current directory
cp ./move_bb8_square.py ./move_bb8_square_copy.py

```

As an alternative, you can use the IDE file explorer on the left panel to copy-paste or move files wherever you want.

Let me know if this fixed your problem.

Regards,  
Girish

---

<div class="post-metadata">

**Author:** ![ralves](https://get-help.theconstruct.ai/user_avatar/get-help.theconstruct.ai/ralves/32/7039_2.png) [@ralves](https://get-help.theconstruct.ai/u/ralves)\
**Post date:** [March 23, 2023, 12:16pm UTC](https://get-help.theconstruct.ai/t/command-cp-error-cp-omitting-directory-move-bb8-square-py/23276/3 "2023-03-23T12:16:41Z")

</div>

Hi @tanmay26,

in addition to what Girish said, I think your **move\_bb8\_square.py** “file” is actually a “folder”. Can you double-check that?

If it is a folder (rather than a file) and you want to copy its entire content, you have to copy it using the “-r” param to copy it recursively, like in the example below:

```auto
cp -r move_bb8_square.py move_bb8_square_copy.py

```

- If the error persists, can you please copy here the complete output, including the command that you executed?
- Could you also paste here what is the output of the command below?

```auto
cd ~/catkin_ws/src/linux_course_files/move_bb8_pkg/my_scripts 

ls -lh

```
