Help required - deleting directory 'R.E.M.' from my hard drive?

  • Thread starter Thread starter MikeD
  • Start date Start date
M

MikeD

Howdy,
I cannot delete an empty directory with special characters in the name and I
am looking for suggestions. The directory in question:
C:\music\R.E.M.

It got created by a friend's Powerbook writing to the shared parent
directory. The trailing . at the end of the end of R.E.M. seems to make it
unidentifiable by windows. If I try to cd to it in DOS I get the message
"does not exist". Things I've tried by googling the newgroup archives:
-dir /x to get the real name - there is no real name. Just R.E.M.
-I run cygwin, tried rm, mv, etc with various quotes 'n wildcards (including
rm \\.\C:\music\R.E.M. and several variants)
-halting explorer process, seeing if any process has a handle on the
directory

Short of strong litigation against the band I'm out of ideas! Perhaps if I
have my friend come back with his Powerbook he could delete it, but he lives
12 hours away! Any ideas?
Lefty
 
Hello!

There's a good article on Windows file naming conventions here:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/base
/naming_a_file.asp

Amongst other things this documents the \\?\ syntax for specifying file
names. This is not supported by all applications, but RD (remove directory
command) seems to. A useful feature of this syntax is that it asks the
system to process the pathname with minimal modification. Windows does not
support filenames ending in a period (as also mentioned in the MSDN
article) and therefore Windows is removing the trailing period before
trying to delete the directory. Using the \\?\ syntax tells Windows not to
do this, and should cure your problem.

Try this:
RD "\\?\C:\music\R.E.M."

Hope this helps,

Kevin Allen [MSFT]

This posting is provided "AS IS" with no warranties, and confers no rights.
 
Back
Top