Windows filesystem deleting errors

This took me a long time to find and implement, but if you every have someone mung file names on a windows server and you start getting

Cannot Delete: Cannot read from source file or disk


You can delete these files using the command prompt.

Type:

dir /x

You will get something like this:

0200~1
0202~1
8183~1
8383~1
FBFB~1
87948~1 87948
020820~1 020820010519p
030815~1 030815111305p

The left is the short naming convention and the right is the directory has shown by explorer.

To delete the directories (doesnt always work, but 90% of the time it does) type:

rd /s directoryname


This came from a customer of mine that decided that it would be fun to open up anonymous FTP and some joker uploaded 30 GB of junk that couldnt be deleted.

 

 

 

 

Top