For those that hit the same problem the solution was to open the folder in a cmd window and list the short names of the files. Then use the short names with the Erase command.
Unable to Delete Files -- File Name Too Long
I copied all of the files under C:\Users<userid> to a backup drive (NTFS). I then tried to delete the Temporary Internet Files folder. I go an error message saying:
The file name(s) would be too long for the destination folder. You can shorten the file name and try again, or try a location that has a shorter path.
When I drilled down to where the problem files were I saw a bunch of files with very long names. I right clicked on one (hoping to rename it) and the only options available were: Open, Pin to Start Menu, Send to. Delete, Rename and Properties were missing.
How do I get rid of these files without having to reformat the drive?
Windows for home | Previous Windows versions | Files, folders, and storage
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
Hi,
Try Disk Cleanup = Start - All Programs - Accessories - System Tools - Disk Cleanup
You may also need to run checkdisk
How to Run Disk Check in Windows 7
http://www.sevenforums.com/tutorials/433-disk-check.html
======================
If needed :
DO NOT INSTALL THE eBay Option with UnLocker (uncheck it in the installer) andthen go into UnLocker Folder in Program Files - UnLocker and DELETE the ebayxxx.exe file - you can easily see it."C:\Program Files\Unlocker" just the ebayxxxx.exe I forget its name exactly.
Author's site shows it as Vista/Windows 7 supported now :
http://www.emptyloop.com/unlocker/
UnLocker 1.92
http://www.softpedia.com/get/System/System-Miscellaneous/Unlocker.shtml <-- or Download UnLocker here ****
Download - SAVE - go to where you put it - Right Click on - RUN AS ADMIN
The below also works on 32 and 64 bit Vista/Win 7 and should work on Win 8/8.1.
Another good alternative - Use FileAssassin :
FileAssassin - Free
http://www.malwarebytes.org/fileassassin.php
Force Delete (Cannot Delete) Locked or In Used Files or Folders with FileASSASSIN
Download - SAVE - go to where you put it - Right Click on - RUN AS ADMIN
And this - MoveOnBoot
MoveOnBoot
http://www.softwarepatch.com/software/moveonboot.html
Hope this helps.
Rob Brown - MS MVP - Windows Desktop Experience : Bicycle - Mark Twain said it right.
84 additional answers
Sort by: Oldest
-
Anonymous
2015-09-13T17:56:09+00:00 Surely do wish I could figure out how to use the cmd window to perform the commands (I have no idea, and cannot figure out, except to open the cmd), the rest remains too complicated. I have two (empty) files on my desktop with exactly the same problem as described in the question above ("files names would be too long for destination file"). For the life of me, I cannot delete those folders. The problem started when there was another folder with the same files with the same name inside the folder, so when opened, all the photos stored were visible, but that same file was duplicated inside the file, with the same photos appearing again. When I went to delete the duplicate file, the error message above was displayed. I have emptied all the photos from the file folder, but it does not matter. Thanks for any help. Russell
-
Anonymous
2015-09-13T20:49:10+00:00 I actually found a very simple solution to this problem, which occurred when I wanted to delete some temporary internet files which were in a backup folder on an external drive. (I guess it would work as well on the C drive too).
Firstly create a temporary folder in the root directory of the drive you wish to delete them from, e.g. C:\temp.
Secondly, go to the folder containing the files e.g. C:\users\fred.............\temporary internet files\ABCD1234EFGH\*.* and copy folder \ABCD1234EFGH into the new folder you created in step one.
Finally delete the temporary folder.
By moving the folder containing the offending files nearer to the root of the drive, you are shortening the path length dramatically and the files are now deletable!
I hope this helps.
-
Anonymous
2015-09-13T21:35:59+00:00 Christopher,
Thanks so much for the extreme kindness of your reply, and the instructions you provided. I am unable to understand the directions you provided, for example "create a temporary file in the root directory of the drive you wish to delete them from." Unfortunately, I am unable to follow that due to ignorance of the terminology (in my profession, attempting to explain to a layman the implications of a congenital berry aneurysm in the Circle of Willis is equally daunting, both for me and the person). That is the best corollary I can find. Sounds simple, but way over my head. Is there a way to break down the instructions step-by-step? Otherwise, I'll have to pay a computer tech to do it for me, and the fees are very high. Thanks a lot for your time and assistance. I am very grateful, if ignorant. Russell