How to delete a file with a space at end of the name and hidden attributes?

In the command prompt, you can put the name of the file in quotes (including the space). For example:

del "failfile.txt "

In Windows Explorer, you can go to Tools | Folder Options, click the View tab, and select "Show hidden files and folders." Then click OK and you'll see the file, and will be able to select and delete or rename it.


It's a while since this questions was asked, but I had the same problem and a simple delete on the command line did not work for.

I had to use the shortened DOS file name to get rid of such an undeletable file. With dir /X you will get the shortened file names. Then use this name for the delete command: del failfi~1.txt.

Tags:

Ntfs