# win\_file module unable to delete directory symbolic links present inside a target dir

**URL:** <https://forum.ansible.com/t/win-file-module-unable-to-delete-directory-symbolic-links-present-inside-a-target-dir/20801>\
**Category:** Ansible Project\
**Created:** [March 8, 2016, 10:24am UTC](https://forum.ansible.com/t/win-file-module-unable-to-delete-directory-symbolic-links-present-inside-a-target-dir/20801 "2016-03-08T10:24:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ishan\_jain](https://avatars.discourse-cdn.com/v4/letter/i/dc4da7/32.png) [@ishan\_jain](https://forum.ansible.com/u/ishan_jain)\
**Post date:** [March 8, 2016, 10:24am UTC](https://forum.ansible.com/t/win-file-module-unable-to-delete-directory-symbolic-links-present-inside-a-target-dir/20801/1 "2016-03-08T10:24:53Z")

</div>

I am trying to delete a parent dir with lots of stuff inside with the help of win\_file:

- name: remove all  
win\_file: path=“E:\root” state=absent

This folder contains a lot other subfolders and symbolic links within itself - both directory and file symbolic links. When i try to run this, i get “DirectoryNotFoundException” for the directory symbolic links. For file symbolic links, win\_file is able to delete all of them.  
How can i make Ansible delete everything in a directory, including directory symbolic links ?

---

<div class="post-metadata">

**Author:** ![ishan\_jain](https://avatars.discourse-cdn.com/v4/letter/i/dc4da7/32.png) [@ishan\_jain](https://forum.ansible.com/u/ishan_jain)\
**Post date:** [March 17, 2016, 5:14am UTC](https://forum.ansible.com/t/win-file-module-unable-to-delete-directory-symbolic-links-present-inside-a-target-dir/20801/2 "2016-03-17T05:14:33Z")

</div>

Still haven’t figured out the solution. Need help here…
