none
Cannot delete files - file name is too long

    Question

  • My system lost its motherboard.  I recoevered data from the hard drive and saved recovered files to my file server.  I back up my server every week.  When I had to delete some back up copies becasue of space, a few files cannot be deleted becasue their filepath is too long (18 to 20 subfolders down).  Is there any way to delete them?  I tried renaming and moving and cut & paste, etc.  I was able to delete the recovery file on my server. 
    Wednesday, October 12, 2011 10:20 PM

Answers

All replies

  • Thursday, October 13, 2011 3:12 AM
  • You can use alternative file manager Total Commander which supports very long file names. Just make sure to un-check Configuration > Options > Copy/Delete > Use Explorer delete method.

    Saturday, March 17, 2012 11:42 AM
  • I have downloaded Long Path Tool and it helped me a lot  in this situation.

    Monday, January 21, 2013 10:01 AM
  • In the solution above, mapping a network drive directly to the problem folder worked like a charm.  Thanks.
    Thursday, February 14, 2013 8:41 PM
  • This is what I do when I cannot delete a file/s when the file name is too long

    1. Drill down into the folders to the folder that has the problem file in it.
    2. Share the folder that contains the file.
    3. Map a network drive to the folder with the problem file.
    4. Open the mapped drive and delete the file I am have the problem.
    5. Disconnect the map drive
    6. Remove the share

    That's it about 2mins worth of work all up hope this helps someone.



    • Edited by PD Duke Wednesday, July 03, 2013 11:02 PM typo
    • Proposed as answer by abu abdalah Thursday, January 23, 2014 9:17 PM
    • Unproposed as answer by abu abdalah Thursday, January 23, 2014 9:17 PM
    • Proposed as answer by PC000001 Friday, January 31, 2014 10:43 AM
    Wednesday, July 03, 2013 11:01 PM
  • Wow... thanks for the tip about Total Commander. I spent hours (over 3) trying to delete a few super-long folders that I accidentally transferred over to my computer when I was trying to rescue a friend's hard drive (from a destroyed laptop). Effing things. 

    So much happier now. I can finally go to bed. :)

    Sunday, July 14, 2013 9:33 AM
  • I just download and use "Long Path Tool" guarantees to fix your error fast and easy.
    Sunday, September 08, 2013 12:29 AM
  • My system lost its motherboard.  I recoevered data from the hard drive and saved recovered files to my file server.  I back up my server every week.  When I had to delete some back up copies becasue of space, a few files cannot be deleted becasue their filepath is too long (18 to 20 subfolders down).  Is there any way to delete them?  I tried renaming and moving and cut & paste, etc.  I was able to delete the recovery file on my server. 
    There are many answers here not sure if any work but there is a simple solution that will work for this and many other undeletable files its a small free program called Unlocker Assistant.Some files it may not be able to delete until reboot but so far I have not run across a file that this program couldn't deal with from renaming moving to deleting the seem to be impossible files it works with all windows from xp to windows 8.
    Tuesday, October 01, 2013 11:17 PM
  • I actually created an account so I could thank you for the link.

    I finally managed to delete those damn files! Thanks =)

    Wednesday, October 02, 2013 5:59 AM
  • THANKS A LOT! This helped me a lot! Only free solution i've found so far!
    Sunday, November 03, 2013 9:34 PM
  • This is what I do when I cannot delete a file/s when the file name is too long

    1. Drill down into the folders to the folder that has the problem file in it.
    2. Share the folder that contains the file.
    3. Map a network drive to the folder with the problem file.
    4. Open the mapped drive and delete the file I am have the problem.
    5. Disconnect the map drive
    6. Remove the share

    That's it about 2mins worth of work all up hope this helps someone.



    Great idea! This was easy and very quick! Even better, I didn't have to download a separate program just to delete some unnecessary temp files. Thank You!

    • Edited by orangedj Tuesday, November 05, 2013 1:13 AM
    Tuesday, November 05, 2013 1:13 AM
  • The Share tip was awesome.  Hootsuite creates some "crazy" temp file names.  Fortunately, I only spent half an hour trying to figure out a work-around before I found this tip.  Excellentx2.  tnx
    Monday, November 18, 2013 5:41 PM
  • I handled this issue mapping the drive (as I had access denied in the server for some reason, even with an administrative account) granted myself full control and used the "del" command to delete the file (as it was too long - 257 characters). The file had spaces in the name so it was like:

    z:\ > del "FW Emailing 14-G-49AB 14-G-50AB 14-G-51AB 14-G-52ABC 14-G-54AB 14-G-54AB-M2-CL 14-G-54AB-M2-TG 14-G-55AB 14-G-56ABC 14-G-105AB 14-G-106AB 14-G-107AB 14-G-108AB 14-G-109AB 14-M-81A-D 14-M-82A-D 14-M-83A-G 14-M-83H-N 14-M-84A-G 14-M-84H.msg"

    Tuesday, December 17, 2013 4:49 PM
  • great...

    but how did you know? its a strange idea....

    Saturday, December 21, 2013 8:06 AM
  • This is what I do when I cannot delete a file/s when the file name is too long

    1. Drill down into the folders to the folder that has the problem file in it.
    2. Share the folder that contains the file.
    3. Map a network drive to the folder with the problem file.
    4. Open the mapped drive and delete the file I am have the problem.
    5. Disconnect the map drive
    6. Remove the share

    That's it about 2mins worth of work all up hope this helps someone.



    Wow... thanks
    Saturday, January 18, 2014 8:05 AM
  • many thanks for your solution its worked perfectly with me.

    many thanks man

    Thursday, January 23, 2014 9:17 PM
  • Hi,

    Long path tool can help on this situation. You can find it from google.

    Thanks.


    Monday, February 10, 2014 6:56 AM
  • Thank you!  I didn't know how to map a drive or "share", so I tried Unlocker Assistant.  It was easy to find and install, Right click on my file and the tool cleared it.  I'll never have that problem again.
    Saturday, March 01, 2014 6:09 PM
  • I really thank you. Your advise works perfectly and It easy to apply.

    Bravo!

    Teshome

    Friday, March 07, 2014 7:15 PM