# ANSIBLE\_KEEP\_REMOTE\_FILES location on windows target?

**URL:** <https://forum.ansible.com/t/ansible-keep-remote-files-location-on-windows-target/26277>\
**Category:** Ansible Project\
**Tags:** windows\
**Created:** [December 13, 2017, 10:19am UTC](https://forum.ansible.com/t/ansible-keep-remote-files-location-on-windows-target/26277 "2017-12-13T10:19:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gareth\_Stockdale](https://avatars.discourse-cdn.com/v4/letter/g/90db22/32.png) [@Gareth\_Stockdale](https://forum.ansible.com/u/Gareth_Stockdale)\
**Post date:** [December 13, 2017, 10:19am UTC](https://forum.ansible.com/t/ansible-keep-remote-files-location-on-windows-target/26277/1 "2017-12-13T10:19:54Z")

</div>

Anyone know the default location of files on windows when using this to run a playbook?

ANSIBLE\_KEEP\_REMOTE\_FILES=1

Thanks

---

<div class="post-metadata">

**Author:** ![Trond\_Hindenes](https://avatars.discourse-cdn.com/v4/letter/t/96bed5/32.png) [@Trond\_Hindenes](https://forum.ansible.com/u/Trond_Hindenes)\
**Post date:** [December 15, 2017, 10:52pm UTC](https://forum.ansible.com/t/ansible-keep-remote-files-location-on-windows-target/26277/2 "2017-12-15T22:52:37Z")

</div>

temp folder of the user account remoting in. So something like  
C:\users\myansibleusers\appdata\local\temp (if memory serves)

---

<div class="post-metadata">

**Author:** ![jborean](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/jborean/32/1525_2.png) [@jborean](https://forum.ansible.com/u/jborean)\
**Post date:** [December 17, 2017, 8:52pm UTC](https://forum.ansible.com/t/ansible-keep-remote-files-location-on-windows-target/26277/3 "2017-12-17T20:52:43Z")

</div>

Ansible used the TEMP environment variable to determine the path to the temporary folder, so you can just type in _%TEMP%_ in Windows explorer to get there for the current user. When doing this through RDP you might be redirected to a folder called 1, 2, 3, … but that’s just an Explorer thing, you would have to move back 1 folder to be in the right location [https://blogs.msdn.microsoft.com/oldnewthing/20110125-00/?p=11673](https://blogs.msdn.microsoft.com/oldnewthing/20110125-00/?p=11673).

In the default case it would be

C:\Users\ansibleuser\AppData\Local\Temp as Trond pointed out.

Thanks

Jordan

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [December 19, 2017, 2:18am UTC](https://forum.ansible.com/t/ansible-keep-remote-files-location-on-windows-target/26277/4 "2017-12-19T02:18:55Z")

</div>

The target dir is also visible if you run with -vvv or higher when we’re not pipelining, eg:

\<192.168.33.51\> PUT “/tmp/tmpflvOc3” TO “C:\Users\vagrant\AppData\Local\Temp\ansible-tmp-1513649854.81-279137826312538\win\_ping.ps1”
