# Move a file on the remote host

**URL:** <https://forum.ansible.com/t/move-a-file-on-the-remote-host/14574>\
**Category:** Ansible Project\
**Created:** [February 16, 2014, 6:23pm UTC](https://forum.ansible.com/t/move-a-file-on-the-remote-host/14574 "2014-02-16T18:23:42Z")\
**Posts on this page:** 3\
**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 16, 2014, 6:23pm UTC](https://forum.ansible.com/t/move-a-file-on-the-remote-host/14574/1 "2014-02-16T18:23:42Z")

</div>

Hi,

I looking for a very simple action : move a file with an ansible module on the remote host. (like the mv command).

Now, I’m using the ‘fetch’ module and then the ‘copy’ module but I sure that there is an ansible module that can the two actions in the same time.

Thanks!!  
Romain

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan1](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Michael\_DeHaan1](https://forum.ansible.com/u/Michael_DeHaan1)\
**Post date:** [February 17, 2014, 3:23pm UTC](https://forum.ansible.com/t/move-a-file-on-the-remote-host/14574/2 "2014-02-17T15:23:58Z")

</div>

Here’s one way to do it:

shell: mv path1 path2 remotes=path1 creates=path2

---

<div class="post-metadata">

**Author:** ![vitaly\_bichov](https://avatars.discourse-cdn.com/v4/letter/v/cc9497/32.png) [@vitaly\_bichov](https://forum.ansible.com/u/vitaly_bichov)\
**Post date:** [March 16, 2016, 11:33am UTC](https://forum.ansible.com/t/move-a-file-on-the-remote-host/14574/3 "2016-03-16T11:33:48Z")

</div>

I’m looking for the same functionality.

For some reason the guys from ansible refuse to implement such module (all solutions suggest using a shell module).

Any idea why is that?
