# Delete Tree fails on folders containing paths over 260 characters

**URL:** <https://www.finalbuilder.com/forums/t/delete-tree-fails-on-folders-containing-paths-over-260-characters/3316>\
**Category:** Bugs\
**Created:** [November 25, 2010, 2:09am UTC](https://www.finalbuilder.com/forums/t/delete-tree-fails-on-folders-containing-paths-over-260-characters/3316 "2010-11-25T02:09:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nelsonwolf](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/n/b9e5f3/32.png) [@nelsonwolf](https://www.finalbuilder.com/forums/u/nelsonwolf)\
**Post date:** [November 25, 2010, 2:09am UTC](https://www.finalbuilder.com/forums/t/delete-tree-fails-on-folders-containing-paths-over-260-characters/3316/1 "2010-11-25T02:09:37Z")

</div>

Our folders have a lot of content in them and I recently noticed they are going over 260 characters in total length. Delete Tree fails on these paths. &nbsp;Is it possible to get a fix for this? &nbsp;The work around I have is calling cmd /c rmdir %longdir% /s /q followed by a fail if exist action. &nbsp;

FinalBuilder 6.4.0.2140 on Win2k8 against a Win2k3 file server.

Thanks,

-Nelson

---

<div class="post-metadata">

**Author:** ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)\
**Post date:** [November 25, 2010, 3:45am UTC](https://www.finalbuilder.com/forums/t/delete-tree-fails-on-folders-containing-paths-over-260-characters/3316/2 "2010-11-25T03:45:35Z")

</div>

Hi Nelson   
  
This is not a bug, it's a limitation of the windows RemoveDirectory API function (and many others).   
  
FYI :   
  
RemoveDirectory   
http://msdn.microsoft.com/en-us/library/aa365247(VS.85).aspx   
  
Naming Files etc - definitely worth a read for anyone developing on windows.   
  
http://msdn.microsoft.com/en-us/library/aa365488%28VS.85%29.aspx   
  
You may be able to use the \\?\ prefix to get around this, I know it works in FB7 (which is a unicode enabled application) but not sure about FB6.

---

<div class="post-metadata">

**Author:** ![nelsonwolf](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/n/b9e5f3/32.png) [@nelsonwolf](https://www.finalbuilder.com/forums/u/nelsonwolf)\
**Post date:** [November 30, 2010, 7:11am UTC](https://www.finalbuilder.com/forums/t/delete-tree-fails-on-folders-containing-paths-over-260-characters/3316/3 "2010-11-30T07:11:34Z")

</div>

Thanks for the links, very good information.
