Quizzes & Puzzles34 mins ago
Deleting deeply nested files
9 Answers
While using a new backup program I managed to put about 20Gb of files on my external HD that was not quite what I wanted and decided to delete them to make room for the right backup folder. Trouble is, there are some files that are so deeply nested that Windows can’t delete because the file name is too long (about 24 levels deep) Is there any way of deleting all these folders and the files within?
Answers
Best Answer
No best answer has yet been selected by realaleman. Once a best answer has been selected, it will be shown here.
For more on marking an answer as the "Best Answer", please visit our FAQ.Just delete the top level folder and it will automatially delete everything under it.
Locate the top level folder in My Computer or Windows Explorer.
Select on the folder with left mouse button so it is selected.
Hold down the SHIFT key (this saves sending it to the recycle bin)
Then RIGHT click on the folder and from the menu select Delete.
The folder and all files / folders underneath will be deleted.
(The fact the files are on your external hard drive means that they probably would not have gone to the recycle bin anyway, but the use of the Shift key is useful if you want to ensure files are deleted right away rather than going to the recylce bin)
Locate the top level folder in My Computer or Windows Explorer.
Select on the folder with left mouse button so it is selected.
Hold down the SHIFT key (this saves sending it to the recycle bin)
Then RIGHT click on the folder and from the menu select Delete.
The folder and all files / folders underneath will be deleted.
(The fact the files are on your external hard drive means that they probably would not have gone to the recycle bin anyway, but the use of the Shift key is useful if you want to ensure files are deleted right away rather than going to the recylce bin)
-- answer removed --
Sorry vehelpfulguy, I used that method to delete all the rest of the files (it took ages) but the last few files are so deep in the directory that windows says the filename is too long. And I can't move them either, of course. I really don'r know how the backup program managed to write them in the first place. I've a nasty suspicion I'll have to reformat the whole darn partition.
How about going into Windows explorer, navigating down to the file or files concerned and try to delete from there.
If that does not work try rename the file so the name is shorter and then deleting it.
Or maybe move the file from its nested directory into a newer folder higher up the chain, maybe into My Documents, where it will have a shorter name.
If that does not work try rename the file so the name is shorter and then deleting it.
Or maybe move the file from its nested directory into a newer folder higher up the chain, maybe into My Documents, where it will have a shorter name.
I've just discovered a microsoft site that tells me that Windows XP has a maximum path length of 255 chars, but with unicode it can be up to about 32,000! Apparently " To specify an extended-length path, use the "\\?\" prefix. For example, "\\?\D:\<very long path>". " . So how do I get to the DOS commandline so I can maybe do something?
Just discovered the command prompt in Accessories and used the command rmdir g:\foldername/s and it disappeared with just one prompt of yes or no. I was expecting it to keep going until it hit the folder with files in and then stop, but my CLI training was on unix and that was years ago, so maybe I've forgotten how rmdir works. How do I check if everythins gone when no folder shows in the root of drive G?
Related Questions
Sorry, we can't find any related questions. Try using the search bar at the top of the page to search for some keywords, or choose a topic and submit your own question.