# Win\_command module adds an additional slash to the windows path.

**URL:** <https://forum.ansible.com/t/win-command-module-adds-an-additional-slash-to-the-windows-path/25936>\
**Category:** Ansible Project\
**Tags:** windows\
**Created:** [November 6, 2017, 10:30am UTC](https://forum.ansible.com/t/win-command-module-adds-an-additional-slash-to-the-windows-path/25936 "2017-11-06T10:30:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![anoop\_vc](https://avatars.discourse-cdn.com/v4/letter/a/ecccb3/32.png) [@anoop\_vc](https://forum.ansible.com/u/anoop_vc)\
**Post date:** [November 6, 2017, 10:30am UTC](https://forum.ansible.com/t/win-command-module-adds-an-additional-slash-to-the-windows-path/25936/1 "2017-11-06T10:30:02Z")

</div>

Please find my YAML below

---

<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:** [November 7, 2017, 9:16am UTC](https://forum.ansible.com/t/win-command-module-adds-an-additional-slash-to-the-windows-path/25936/2 "2017-11-07T09:16:16Z")

</div>

You don’t mention which ansible version you are using, but I think latest devel version and possible 2.4.1 has some improvements to argument handling for win command.

If you are using an older ansible version, I suggest trying win\_shell. Make sure groovy is on your PATH (or use the args: chdir option of win\_command / win\_shell so that the command itself can be found too).

There’s a very useful page about how to form windows paths in yaml for ansible playbooks recently been added to the documentation here: [https://docs.ansible.com/ansible/devel/windows\_usage.html#path-formatting-for-windows](https://docs.ansible.com/ansible/devel/windows_usage.html#path-formatting-for-windows)

Hope this helps,

Jon
