# Copy module: move directories recursively

**URL:** <https://forum.ansible.com/t/copy-module-move-directories-recursively/26168>\
**Category:** Ansible Developer\
**Created:** [November 29, 2017, 4:58pm UTC](https://forum.ansible.com/t/copy-module-move-directories-recursively/26168 "2017-11-29T16:58:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Willian\_Paixao](https://avatars.discourse-cdn.com/v4/letter/w/c77e96/32.png) [@Willian\_Paixao](https://forum.ansible.com/u/Willian_Paixao)\
**Post date:** [November 29, 2017, 4:58pm UTC](https://forum.ansible.com/t/copy-module-move-directories-recursively/26168/1 "2017-11-29T16:58:47Z")

</div>

Hello,

I’ve been trying to move a folder and its contents to another path,  
after a few tries and a couple of googles, I found that it can’t be done  
just using file or copy modules, rather command or synchronize modules,  
which is not an elegant way of get this simple job done.

I propose a flag in either file or copy modules (someone more experienced  
will have a better idea) to recursively copy the folder and it’s files to the desired  
destination. I can implement and send the pull request myself, as long as a maintainer  
shows interest in the feature.

What do you guys say?

Best regards,

---

<div class="post-metadata">

**Author:** ![Adam\_Miller](https://avatars.discourse-cdn.com/v4/letter/a/bbe5ce/32.png) [@Adam\_Miller](https://forum.ansible.com/u/Adam_Miller)\
**Post date:** [December 13, 2017, 3:17pm UTC](https://forum.ansible.com/t/copy-module-move-directories-recursively/26168/2 "2017-12-13T15:17:24Z")

</div>

> Hello,
> 
> I've been trying to move a folder and its contents to another path,  
> after a few tries and a couple of googles, I found that it can't be done  
> just using file or copy modules, rather command or synchronize modules,  
> which is not an elegant way of get this simple job done.
> 
> I propose a flag in either file or copy modules (someone more experienced  
> will have a better idea) to recursively copy the folder and it's files to  
> the desired  
> destination. I can implement and send the pull request myself, as long as a  
> maintainer  
> shows interest in the feature.
> 
> What do you guys say?

Are you trying to move or copy? These would be explicitly different  
operations and I suspect would garner different feedback. I'm guessing  
you mean "move" based on subject line but you then suggest a recursive  
copy for implementation so I wanted to clarify.

-AdamM
