Cannot delete file ending in a period

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Occasionally on the desktop of our lab machines where only User permissions
are allowed appears a file with a strange name and ends with a period. For
example:

CAY7C1U3.

I cannot delete it and don't know how it gets on there.

Anyone seen this and can suggest a solution?
 
you will probalby have to reboot in safe mode and try to delete it from
there. otherwise you may have to log on as administrator in safe mode and
delete from there.
 
[[You may not be able to delete a file if the file name includes an invalid
name (for example, the file name has a trailing space or a trailing period
or the file name is made up of a space only). To resolve this issue, use a
tool that uses the appropriate internal syntax to delete the file. You can
use the "\\?\" syntax with some tools to operate on these files, for
example:

del "\\?\c:\path_to_file_that contains a trailing space.txt "

The cause of this issue is similar to Cause 4. However, if you use typical
Win32 syntax to open a file that has trailing spaces or trailing periods in
its name, the trailing spaces or periods are stripped before the actual file
is opened. Therefore, if you have two files in the same folder named
"AFile.txt" and "AFile.txt " (note the space after the file name), if you
try to open the second file by using standard Win32 calls, you open the
first file instead. Similarly, if you have a file whose name is just " " (a
space character) and you try to open it by using standard Win32 calls, you
open the file's parent folder instead. In this situation, if you try to
change security settings on these files, you either may not be able to do
this or you may unexpectedly change the settings on different files. If this
behavior occurs, you may think that you have permission to a file that
actually has a restrictive ACL. ]]
Cause 6: The file name includes an invalid name in the Win32 name space
http://support.microsoft.com/default.aspx?scid=kb;en-us;320081#XSLTH3195121122120121120120

You cannot delete a file or a folder on an NTFS file system volume
http://support.microsoft.com/default.aspx?scid=kb;en-us;320081

--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In
 
I had this problem on a Win XP machine after doing a file recovery rebuild. There was an invalid file called "introduction." I got rid of it by first clearing out all the other files in that directory.
I then opened the command window, and navigated to the directory concerned.
I checked with "Dir" that the file concerned was the only one in the directory, then entered "del *.*"
NB you need to be logged into the directory concerned, because (obviously) that command string will delete everything it finds in the directory!
Bingo! no more rubbish file. I was then able to remove the offending directory normally under Windows, which the corrupt file had previously prevented.

Hope this helps :D
 
Back
Top