Occasionally, because there is a very long folder under eclipse (its plug-in directory is most likely to cause this problem ), as a result, "the specified file name cannot be deleted is invalid or too long" is displayed during deletion "! I told you to use a robocopy on the Internet. At that time, I didn't want to delete a folder and install such an additional software. Later I thought about whether it could be used in my computer's "unlocker assistant ". Sometimes windows locks a folder or file and cannot be deleted. You can use unlocker to unlock it and then delete it. Although the main purpose of unlocker is to unlock the lock, can it also be used to try to delete this long folder?
The test results are acceptable:
1. First, create a new directory next to the directory to be deleted (it is impossible to create a new directory in the directory to be deleted, windows prompts invalid file names ). As follows:
--
.../Parent directory/Directories that cannot be deleted/Directory file .txt
.../Parent directory/Create folder
2. Use the command line console to enter the new directory (this step aims to activate the unlocker Assistant)
D:/> ....../parent directory/new folder>
3. Delete the "parent directory". At this time, unlocker is activated. Follow these steps to delete the directories with ultra-long file names:
Click OK to bring up the unlocker interface. In the drop-down box, select Delete, as shown in:
Choose cmd.exe ....
Click "process ended:
The final result is: The cmd.exe command line console is closed, and both the ultra-long folder and the new folder are deleted: