Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. How to delete a file with a quote in its name?

How to delete a file with a quote in its name?

Scheduled Pinned Locked Moved The Lounge
helpquestiondatabasesecurityjson
10 Posts 7 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Jonathan Gilligan
    wrote on last edited by
    #1

    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 can stat() 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 as Dd"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...

    G D B L 4 Replies Last reply
    0
    • J Jonathan Gilligan

      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 can stat() 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 as Dd"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...

      G Offline
      G Offline
      George
      wrote on last edited by
      #2

      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...

      M 1 Reply Last reply
      0
      • G George

        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...

        M Offline
        M Offline
        Michael Dunn
        wrote on last edited by
        #3

        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.

        1 Reply Last reply
        0
        • J Jonathan Gilligan

          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 can stat() 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 as Dd"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...

          D Offline
          D Offline
          Daniel Ferguson
          wrote on last edited by
          #4

          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

          R 1 Reply Last reply
          0
          • J Jonathan Gilligan

            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 can stat() 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 as Dd"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...

            B Offline
            B Offline
            Bruce Duncan
            wrote on last edited by
            #5

            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

            J 1 Reply Last reply
            0
            • J Jonathan Gilligan

              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 can stat() 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 as Dd"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...

              L Offline
              L Offline
              Luca Leonardo Scorcia
              wrote on last edited by
              #6

              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)

              J 1 Reply Last reply
              0
              • D Daniel Ferguson

                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

                R Offline
                R Offline
                Reno Tiko
                wrote on last edited by
                #7

                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 ... :)

                D 1 Reply Last reply
                0
                • R Reno Tiko

                  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 ... :)

                  D Offline
                  D Offline
                  Daniel Ferguson
                  wrote on last edited by
                  #8

                  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

                  1 Reply Last reply
                  0
                  • L Luca Leonardo Scorcia

                    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)

                    J Offline
                    J Offline
                    Jonathan Gilligan
                    wrote on last edited by
                    #9

                    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>

                    1 Reply Last reply
                    0
                    • B Bruce Duncan

                      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

                      J Offline
                      J Offline
                      Jonathan Gilligan
                      wrote on last edited by
                      #10

                      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-D2B2

                      Directory 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 free

                      D:\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.

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups