# Move a file from a remote host to the same remote host

**URL:** <https://forum.ansible.com/t/move-a-file-from-a-remote-host-to-the-same-remote-host/14569>\
**Category:** Ansible Project\
**Created:** [February 14, 2014, 10:22pm UTC](https://forum.ansible.com/t/move-a-file-from-a-remote-host-to-the-same-remote-host/14569 "2014-02-14T22:22:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Romain\_NIO](https://avatars.discourse-cdn.com/v4/letter/r/f0a364/32.png) [@Romain\_NIO](https://forum.ansible.com/u/Romain_NIO)\
**Post date:** [February 14, 2014, 10:22pm UTC](https://forum.ansible.com/t/move-a-file-from-a-remote-host-to-the-same-remote-host/14569/1 "2014-02-14T22:22:44Z")

</div>

Hi,

I’m looking for a very simple thing : an ansible command to move a file (or a folder) to an other file/folder on the remote host.

The ‘copy’ module can copy from the local machine to the remote host, I want the same but for copying from remote host to remote host…

I try to avoid using ‘command’ module with ‘mv’, I assume that it’s possible to perform it with ansible.

Any suggestions?

Thanks,  
Romain.

---

<div class="post-metadata">

**Author:** ![Walid](https://avatars.discourse-cdn.com/v4/letter/w/ea5d25/32.png) [@Walid](https://forum.ansible.com/u/Walid)\
**Post date:** [February 17, 2014, 7:27pm UTC](https://forum.ansible.com/t/move-a-file-from-a-remote-host-to-the-same-remote-host/14569/2 "2014-02-17T19:27:27Z")

</div>

check the synchronize module and delegate.
