Deleting a file with a . (period) in the end

This one had me baffled for a complete day. I was downloading this file and the filename was myfile.mp4.. Since the file was not completely downloaded I tried deleting it but I got the error.

Cannot delete file: Cannot read from the source file or disk.
I tried renaming it and I got an even weirder error.

The system cannot find the specified file
I figured it would be easier to remove it from the command line so I tried del "myfile.mp4." but to my surprise even that did not work out. After almost giving up I tried Google and it came up with these solutions on Even that did not help out.

After spending a few more minutes searching online I realized that the problem was in the way windows treats filenames. Since each file has two names one the 8.3 format and the other name which we normally use.

To see a list of files in 8.3 use the command on the command line. dir/x Try this in the directory and see the 8.3 name for that file. Now try and delete it using the 8.3 and hopefully you will be able to remove the file. In my case it was del MYFILE~1 that did the trick. Since I wasted so much time this problem certainly deserved a post.


Unknown said…
Ue "LongPathTool I've been using this for an alternative fix.

Popular posts from this blog

The best mobile development platform for hobbyist programmer

Using Voicemail with Airtel Prepaid Karnataka

Airtel 16Mbps for Impatient Ones