How to delete a file with a quote in its name?
-
There are several junk files on an NTFS volume (Win2K Pro, SP2) with quotation marks in their names. If I try to delete them from the command line or explorer, I get error messages like
Cannot delete Dd"158: The filename, directory name, or volume label syntax is incorrect.
. Experimenting shows that files with quotation marks are not allowed by any Windows API file creation or deletion function I can find. Curiously, I canstat()
them. I can examine the files, but just cannot change them or delete them. I have checked their security DACLs and there are no deny flags, and Everyone has Full Control. The DOS attributes don't have any flags set except "A". The problem seems to be that somehow these files got onto the disk, but nothing I can find in Windows allows me to delete them. Another clue is that I have intermittent (daily) warnings on the event log about a corrupt NTFS volume. Running chkdsk /f generally claims to fix a number of index inconsistencies (different each time) in phase 2. Phases 1 (file system), 3 (security), 4 (file data), and 5 (empty space) don't show any errors. So the question is, How do I delete a file with a quotation mark in its name, such asDd"158.obj
? Can anyone help me on this? I could reformat the disk, but it takes me about two days to get all the software reinstalled and configured, so I would really rather not... Thanks for any help anyone can offer... -
There are several junk files on an NTFS volume (Win2K Pro, SP2) with quotation marks in their names. If I try to delete them from the command line or explorer, I get error messages like
Cannot delete Dd"158: The filename, directory name, or volume label syntax is incorrect.
. Experimenting shows that files with quotation marks are not allowed by any Windows API file creation or deletion function I can find. Curiously, I canstat()
them. I can examine the files, but just cannot change them or delete them. I have checked their security DACLs and there are no deny flags, and Everyone has Full Control. The DOS attributes don't have any flags set except "A". The problem seems to be that somehow these files got onto the disk, but nothing I can find in Windows allows me to delete them. Another clue is that I have intermittent (daily) warnings on the event log about a corrupt NTFS volume. Running chkdsk /f generally claims to fix a number of index inconsistencies (different each time) in phase 2. Phases 1 (file system), 3 (security), 4 (file data), and 5 (empty space) don't show any errors. So the question is, How do I delete a file with a quotation mark in its name, such asDd"158.obj
? Can anyone help me on this? I could reformat the disk, but it takes me about two days to get all the software reinstalled and configured, so I would really rather not... Thanks for any help anyone can offer... -
I think you need some serious disk repair utility, like Norton Disk Doctor (not sure if it works with NTFS...), or something because it seems to be corrupted and windows will not let you fix that...
George wrote: Norton Disk Doctor (not sure if it works with NTFS) It does :) --Mike-- "COM didn't solve the old version of DLL hell - it just provided us with a new and improved version of hell." -- John Simmons, 1/22/2002 My really out-of-date homepage Sonork - 100.10414 AcidHelm Big fan of Alyson Hannigan.
-
There are several junk files on an NTFS volume (Win2K Pro, SP2) with quotation marks in their names. If I try to delete them from the command line or explorer, I get error messages like
Cannot delete Dd"158: The filename, directory name, or volume label syntax is incorrect.
. Experimenting shows that files with quotation marks are not allowed by any Windows API file creation or deletion function I can find. Curiously, I canstat()
them. I can examine the files, but just cannot change them or delete them. I have checked their security DACLs and there are no deny flags, and Everyone has Full Control. The DOS attributes don't have any flags set except "A". The problem seems to be that somehow these files got onto the disk, but nothing I can find in Windows allows me to delete them. Another clue is that I have intermittent (daily) warnings on the event log about a corrupt NTFS volume. Running chkdsk /f generally claims to fix a number of index inconsistencies (different each time) in phase 2. Phases 1 (file system), 3 (security), 4 (file data), and 5 (empty space) don't show any errors. So the question is, How do I delete a file with a quotation mark in its name, such asDd"158.obj
? Can anyone help me on this? I could reformat the disk, but it takes me about two days to get all the software reinstalled and configured, so I would really rather not... Thanks for any help anyone can offer...I did a trick on/for a co-worker once in which I created a file on his desktop that he couldn't delete. I think it involved using extended ascii characters, but I can't recall. Anyway, it was fun watching him try to delete the file. I'm not cruel though, so I showed him how to delete the file later. "The world has achieved brilliance without wisdom, power without conscience. Ours is a world of nuclear giants and ethical infants." - Omar Bradley
-
There are several junk files on an NTFS volume (Win2K Pro, SP2) with quotation marks in their names. If I try to delete them from the command line or explorer, I get error messages like
Cannot delete Dd"158: The filename, directory name, or volume label syntax is incorrect.
. Experimenting shows that files with quotation marks are not allowed by any Windows API file creation or deletion function I can find. Curiously, I canstat()
them. I can examine the files, but just cannot change them or delete them. I have checked their security DACLs and there are no deny flags, and Everyone has Full Control. The DOS attributes don't have any flags set except "A". The problem seems to be that somehow these files got onto the disk, but nothing I can find in Windows allows me to delete them. Another clue is that I have intermittent (daily) warnings on the event log about a corrupt NTFS volume. Running chkdsk /f generally claims to fix a number of index inconsistencies (different each time) in phase 2. Phases 1 (file system), 3 (security), 4 (file data), and 5 (empty space) don't show any errors. So the question is, How do I delete a file with a quotation mark in its name, such asDd"158.obj
? Can anyone help me on this? I could reformat the disk, but it takes me about two days to get all the software reinstalled and configured, so I would really rather not... Thanks for any help anyone can offer...Maybe you can try doing a delete from the command line using the file's short (8.3) name ? (as long as the short name does not also have any invalid chars.) dir /x list both long and short names But it sounds as though you really need a decent disk checking tool, it could probably fix these problem names for you.
Bruce Duncan | The Digital Delirium | Sonork ID 100.10030 Aythos
-
There are several junk files on an NTFS volume (Win2K Pro, SP2) with quotation marks in their names. If I try to delete them from the command line or explorer, I get error messages like
Cannot delete Dd"158: The filename, directory name, or volume label syntax is incorrect.
. Experimenting shows that files with quotation marks are not allowed by any Windows API file creation or deletion function I can find. Curiously, I canstat()
them. I can examine the files, but just cannot change them or delete them. I have checked their security DACLs and there are no deny flags, and Everyone has Full Control. The DOS attributes don't have any flags set except "A". The problem seems to be that somehow these files got onto the disk, but nothing I can find in Windows allows me to delete them. Another clue is that I have intermittent (daily) warnings on the event log about a corrupt NTFS volume. Running chkdsk /f generally claims to fix a number of index inconsistencies (different each time) in phase 2. Phases 1 (file system), 3 (security), 4 (file data), and 5 (empty space) don't show any errors. So the question is, How do I delete a file with a quotation mark in its name, such asDd"158.obj
? Can anyone help me on this? I could reformat the disk, but it takes me about two days to get all the software reinstalled and configured, so I would really rather not... Thanks for any help anyone can offer...Usually a simple del dd*.obj from a command prompt works for me. However if this happens frequently you should check carefully your HD :) The Keejay (Luca Leonardo Scorcia) vrkeejay@hotmail.com http://zip.to/kojak (only in Italian)
-
I did a trick on/for a co-worker once in which I created a file on his desktop that he couldn't delete. I think it involved using extended ascii characters, but I can't recall. Anyway, it was fun watching him try to delete the file. I'm not cruel though, so I showed him how to delete the file later. "The world has achieved brilliance without wisdom, power without conscience. Ours is a world of nuclear giants and ethical infants." - Omar Bradley
Daniel Ferguson wrote: I did a trick on/for a co-worker once in which I created a file on his desktop that he couldn't delete. I think it involved using extended ascii characters, but I can't recall. Anyway, it was fun watching him try to delete the file. I'm not cruel though, so I showed him how to delete the file later. So, how did you do the trick, and how does one delete it afterwards? Just curious ... :)
-
Daniel Ferguson wrote: I did a trick on/for a co-worker once in which I created a file on his desktop that he couldn't delete. I think it involved using extended ascii characters, but I can't recall. Anyway, it was fun watching him try to delete the file. I'm not cruel though, so I showed him how to delete the file later. So, how did you do the trick, and how does one delete it afterwards? Just curious ... :)
You have to create the file from a Win9x DOS box (It doesn't work on Win2K). Name the file whatever you want, but include the character you get by pressing alt+255. It looks like a space, but isn't. (I think space is 32) If you select the file in windows explorer you shouldn't be able to delete it. You have to delete the file from DOS, just like you created it. "The world has achieved brilliance without wisdom, power without conscience. Ours is a world of nuclear giants and ethical infants." - Omar Bradley
-
Usually a simple del dd*.obj from a command prompt works for me. However if this happens frequently you should check carefully your HD :) The Keejay (Luca Leonardo Scorcia) vrkeejay@hotmail.com http://zip.to/kojak (only in Italian)
It goes deeper than that. dd*.obj yields this:
D:\foo>del dd*.obj
D:\foo\Dd"158.obj
The filename, directory name, or volume label syntax is incorrect.D:\foo>
-
Maybe you can try doing a delete from the command line using the file's short (8.3) name ? (as long as the short name does not also have any invalid chars.) dir /x list both long and short names But it sounds as though you really need a decent disk checking tool, it could probably fix these problem names for you.
Bruce Duncan | The Digital Delirium | Sonork ID 100.10030 Aythos
Bruce Duncan wrote: Maybe you can try doing a delete from the command line using the file's short (8.3) name ? (as long as the short name does not also have any invalid chars.) dir /x list both long and short names But it sounds as though you really need a decent disk checking tool, it could probably fix these problem names for you. Thanks for the suggestion. Unfortunately, there doesn't seem to be an 8.3 name.
D:\foo>dir /x
Volume in drive D is Terra Incognita
Volume Serial Number is F8A8-D2B2Directory of D:\foo
06/27/2001 01:54a 1,879 Dd"158.obj
06/27/2001 02:22a 4,964 Dd"194.obj
10/14/2000 12:14p 1,579,300 Dd"55.pch
3 File(s) 1,586,143 bytes
0 Dir(s) 7,662,944,256 bytes freeD:\foo>
I finally found a related article on the Knowledge base at Microsoft that tells me that the disk is almost surely hosed beyond repair, and which recommends reformatting as the only solution.