# Copying or moving files on Windows systems

**URL:** <https://forum.ansible.com/t/copying-or-moving-files-on-windows-systems/22850>\
**Category:** Ansible Project\
**Tags:** windows\
**Created:** [October 21, 2016, 5:56am UTC](https://forum.ansible.com/t/copying-or-moving-files-on-windows-systems/22850 "2016-10-21T05:56:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mike\_Fennemore](https://avatars.discourse-cdn.com/v4/letter/m/45deac/32.png) [@Mike\_Fennemore](https://forum.ansible.com/u/Mike_Fennemore)\
**Post date:** [October 21, 2016, 5:56am UTC](https://forum.ansible.com/t/copying-or-moving-files-on-windows-systems/22850/1 "2016-10-21T05:56:25Z")

</div>

When using a Centos Ansible control machine connecting to Windows server, is there a way to copy/move files on the Windows system? Win\_copy works well for copying to the Windows system but doesn't seem to be able to fit this use. In particular I have tried moving/copying files using raw,win\_command and win\_shell with the catch that the file paths have spaces in them. i.e copy \*.\* c:\program files\app\*.\*

---

<div class="post-metadata">

**Author:** ![Matt\_Davis](https://avatars.discourse-cdn.com/v4/letter/m/ce7236/32.png) [@Matt\_Davis](https://forum.ansible.com/u/Matt_Davis)\
**Post date:** [October 21, 2016, 4:02pm UTC](https://forum.ansible.com/t/copying-or-moving-files-on-windows-systems/22850/2 "2016-10-21T16:02:36Z")

</div>

The win\_robocopy extras module should probably cover your needs…

---

<div class="post-metadata">

**Author:** ![j.r.hawkesworth](https://avatars.discourse-cdn.com/v4/letter/j/a3d4f5/32.png) [@j.r.hawkesworth](https://forum.ansible.com/u/j.r.hawkesworth)\
**Post date:** [October 21, 2016, 4:29pm UTC](https://forum.ansible.com/t/copying-or-moving-files-on-windows-systems/22850/3 "2016-10-21T16:29:27Z")

</div>

Another thing that might trip you up is that C:\Program Files\ is rather more locked down in modern windows versions than it was in older ones, so you might have trouble copying to that location if you don’t have full admin privs.

I don’t recall specifics now but I know I wound up installing some .exe files not in Program Files as a result of this change during a S2003 to 2012R2 migration.

Jon
