# win\_find - use result path

**URL:** <https://forum.ansible.com/t/win-find-use-result-path/27694>\
**Category:** Ansible Project\
**Created:** [June 3, 2018, 12:55pm UTC](https://forum.ansible.com/t/win-find-use-result-path/27694 "2018-06-03T12:55:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jeremie\_Levy](https://avatars.discourse-cdn.com/v4/letter/j/e95f7d/32.png) [@Jeremie\_Levy](https://forum.ansible.com/u/Jeremie_Levy)\
**Post date:** [June 3, 2018, 12:55pm UTC](https://forum.ansible.com/t/win-find-use-result-path/27694/1 "2018-06-03T12:55:44Z")

</div>

Hi  
I can’t find the way to use the result of win\_find module.  
I need to modify the files from the register and encounter some errors:

`

---

<div class="post-metadata">

**Author:** ![Kai\_Stian\_Olstad](https://avatars.discourse-cdn.com/v4/letter/k/e19adc/32.png) [@Kai\_Stian\_Olstad](https://forum.ansible.com/u/Kai_Stian_Olstad)\
**Post date:** [June 3, 2018, 2:15pm UTC](https://forum.ansible.com/t/win-find-use-result-path/27694/2 "2018-06-03T14:15:54Z")

</div>

var: takes the name of a variable, not the content of one.

So the correct syntax would be.  
&nbsp;&nbsp;&nbsp;- name: output wrapper list2  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;debug:  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var: item.path  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;with\_items: "{{wrapper.files}}"

An alternative is to use debugs msg.

&nbsp;&nbsp;&nbsp;- name: output wrapper list2  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;debug:  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;msg: "The file name is {{ item.path }}"  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;with\_items: "{{wrapper.files}}"

---

<div class="post-metadata">

**Author:** ![Jeremie\_Levy](https://avatars.discourse-cdn.com/v4/letter/j/e95f7d/32.png) [@Jeremie\_Levy](https://forum.ansible.com/u/Jeremie_Levy)\
**Post date:** [June 3, 2018, 4:15pm UTC](https://forum.ansible.com/t/win-find-use-result-path/27694/3 "2018-06-03T16:15:15Z")

</div>

It worked like a charm, i wasn’t aware of that, thank you for your help!
