View Single Post
  #7 (permalink)  
Old 06-25-2008, 03:39 PM
plexor plexor is offline
Junior Member
 
Join Date: Jun 2008
Posts: 1
Hopefully the answer!
John

I had a similar problem on two machines. The symptoms are files that are named "XXXXXXX.", appear to be 0 bytes and will not delete. Having passed through this thread and combined with another I have now successfully deleted the files. The process is outlined below:

In this example the offending filename is "HAG6506AB." and is on the Desktop, for which the path is D:\Documents and Settings\User01\Desktop

First bring up a command prompt, via Start, Run, cmd

Run a DIR on the desktop folder using the /x amd /a parameters to display the full file information and short names. You should then see the offending file, in this case "HAG650~1" as the shortname and "HAG6506AB." as the long name.

Run an ATTRIB on the file, using the shortname for the file:

attrib \\?\D:\"Documents and Settings"\stephen.j.barber\Desktop\HAG650~1

This may well show an "S" system attribute:

S \\?\D:\Documents and Settings\User01\Desktop\HAG6506AB

The reason for the \\?\ at the beginning and the "quotes" is that this format bypasses all Win32 file name canonicalization

Remove the System using the shortname for the file:

attrib -s \\?\D:\"Documents and Settings"\User01\Desktop\HAG650~1

and then delete the file via:

del \\?\D:\"Documents and Settings"\User01\Desktop\HAG650~1

If all goes well, the files should disappear! The cause of the issue is the "." at the end of the filename which Windows does not like, however the NTFS file system is quite happy with. Microsoft hypocrisy at its best :-)
Reply With Quote