Remove Files and Directories that have no name

From TomSchaefer.org Wiki

Jump to: navigation, search

1. Empty out the folder in question (if it is a folder). You should be able to do this with explorer
2. Open ‘Command Prompt’ by: clicking ‘Start’ -> click ‘Run’ -> type ‘cmd’ (without the quotes) -> hit the ‘Enter’ key
3. Navigate through the command prompt to the folder containing the offending folder/file.

If the path of the offending folder/file is “C:\path\to\folder\” then you can type: “cd \path\to\folder\” and hit ‘Enter’.
4. Find the short name for the folder/file by using the command ‘dir’ with the parameter /x.

For example

dir /x

Example of a short name:

0200~1

5. Use this short name to remove the folder/file.

If it is a file with the short name ‘0200~1′:

del 0200~1

If it is a folder with the short name ‘0200~1′:

rmdir 0200~1

Personal tools