When importing a project into eclipse, it somehow started creating recursive versions of the directory.
Now, when I try to delete anything, I get the message " the file name you specify is too long."
I can't delete it from the command shell. I can't delete it from explorer. I can't do ANYTHING with it. I have no idea how many copies of it Eclipse created. Eclipse was running for like a minute before I realized something was wrong and I cancelled the operation.
I can get the properties of the top level folder, and it says it contains 497 folders.
Question 1: how can I delete all this stuff in Windows?
Question 2: What the hell was eclipse thinking?
For those who are unable to use this solution I have an alternative solution that worked for me (with too long path/file names): Move the file(s)/directory to C:\ to shorten the path, then delete from there. It is possible to have directories that this solution won't work for, that 7-Zip can delete.
If the path is too long and not just the filename itself, you can easily just rename the folders to make the path shorter. But to delete a file whose name is more than 255 characters: Open a command prompt by running "CMD.
Thanks for your help. Go to File Explorer, locate and select the files/folders, hold down the shift key and hit the Delete key. That removes them completely and they do not go into the recycle bin.
The general strategy is to keep the first two folders at the beginning, replace the middle with an ellipsis, and leave the final folder and filename on the end.
robocopy empty_dir base_nested_dir /purge
Example: If you have a folder path that's too long such as:
D:\BackupFolder\Copy\MyFiles\BackupFolder\Copy\MyFiles\BackupFolder\Copy\MyFiles\BackupFolder\Copy\MyFiles\BackupFolder\Copy\MyFiles\BackupFolder\Copy\MyFiles\BackupFolder\Copy\MyFiles\BackupFolder\Copy\MyFiles\BackupFolder\Copy\MyFiles\BackupFolder\Copy\MyFiles\BackupFolder\Copy\MyFiles\BackupFolder\Copy\MyFiles\BackupFolder\Copy\MyFiles
follow these instructions to delete it.
C:\Users\Name\Desktop\temp
.robocopy C:\Users\Name\Desktop\temp D:\BackupFolder /purge
Note: If there are spaces in either path in Step 3, the path must be inclosed by quotation marks.
7Zip is the ultimate solution if you are not comfortable with command-line.
Cheers!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With