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. something won't let me delete a file

something won't let me delete a file

Scheduled Pinned Locked Moved The Lounge
questionalgorithmstoolshelptutorial
19 Posts 10 Posters 0 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.
  • M MikeBeard

    All, I've a situation where I'd like to delete a directory and I'm told that I can't because something won't let me (I forget the exact message I got). It's a directory that I've created and I would think that I could delete it, but ... Is there a way (preferrably a utility of some sort) to determine what is holding onto it? Awhile back, I think that I remember someone asking about how to determine who is holding onto a file that couldn't be moved/deleted or something to that affect. Again, if I remember correctly, someone else said that there was a utility that would somehow determine who was holding/touching/whatever so that the OS wouldn't let it be operated on. Does this sound familar to anyone? I tried searching the lounge but apparently didn't remember the correct keywords. Any help would be greatly appreciated. Thanks, Mike

    J Offline
    J Offline
    JimmyRopes
    wrote on last edited by
    #8

    rm -f <filename> :-D

    Simply Elegant Designs JimmyRopes Designs
    Think inside the box! ProActive Secure Systems
    I'm on-line therefore I am. JimmyRopes

    M 1 Reply Last reply
    0
    • M MikeBeard

      All, I've a situation where I'd like to delete a directory and I'm told that I can't because something won't let me (I forget the exact message I got). It's a directory that I've created and I would think that I could delete it, but ... Is there a way (preferrably a utility of some sort) to determine what is holding onto it? Awhile back, I think that I remember someone asking about how to determine who is holding onto a file that couldn't be moved/deleted or something to that affect. Again, if I remember correctly, someone else said that there was a utility that would somehow determine who was holding/touching/whatever so that the OS wouldn't let it be operated on. Does this sound familar to anyone? I tried searching the lounge but apparently didn't remember the correct keywords. Any help would be greatly appreciated. Thanks, Mike

      B Offline
      B Offline
      baloneyman
      wrote on last edited by
      #9

      I've had instances where for some reason I couldn't delete a directory until I deleted one of its sub-directories. Never figured out where it drew the line as other directories with subs deleted fine... Roy

      M 1 Reply Last reply
      0
      • M MikeBeard

        Thanks Neil, I'll have to take a look at it. It looks good and I like all the stuff that Mark Russinovich has written that I've ended up using. I didn't realize that it would show who is holding it. That will be nice to know. Thanks again.

        M Offline
        M Offline
        malharone
        wrote on last edited by
        #10

        It does .. search for a handle on a specific file name, and it'll list the processes that are locking the file. - Malhar

        M 1 Reply Last reply
        0
        • J JimmyRopes

          rm -f <filename> :-D

          Simply Elegant Designs JimmyRopes Designs
          Think inside the box! ProActive Secure Systems
          I'm on-line therefore I am. JimmyRopes

          M Offline
          M Offline
          MikeBeard
          wrote on last edited by
          #11

          I'll remember to try that next time! :-D

          1 Reply Last reply
          0
          • B baloneyman

            I've had instances where for some reason I couldn't delete a directory until I deleted one of its sub-directories. Never figured out where it drew the line as other directories with subs deleted fine... Roy

            M Offline
            M Offline
            MikeBeard
            wrote on last edited by
            #12

            Yeah, sometimes the OS does strange stuff.

            1 Reply Last reply
            0
            • M MikeBeard

              Thanks Neil, I'll have to take a look at it. It looks good and I like all the stuff that Mark Russinovich has written that I've ended up using. I didn't realize that it would show who is holding it. That will be nice to know. Thanks again.

              N Offline
              N Offline
              NormDroid
              wrote on last edited by
              #13

              I bet it's a service or driver.

              Roger Irrelevant "he's completely hatstand"

              M 1 Reply Last reply
              0
              • M MikeBeard

                All, I've a situation where I'd like to delete a directory and I'm told that I can't because something won't let me (I forget the exact message I got). It's a directory that I've created and I would think that I could delete it, but ... Is there a way (preferrably a utility of some sort) to determine what is holding onto it? Awhile back, I think that I remember someone asking about how to determine who is holding onto a file that couldn't be moved/deleted or something to that affect. Again, if I remember correctly, someone else said that there was a utility that would somehow determine who was holding/touching/whatever so that the OS wouldn't let it be operated on. Does this sound familar to anyone? I tried searching the lounge but apparently didn't remember the correct keywords. Any help would be greatly appreciated. Thanks, Mike

                J Offline
                J Offline
                jlwarlow
                wrote on last edited by
                #14

                Process explorer; previously SysInternals, now part Microsoft. You can search for handles and then kill the process (as long as it's not a system process - you wouldn't want to kill those!) http://www.microsoft.com/technet/sysinternals/Utilities/ProcessExplorer.mspx[^]

                Never argue with an imbecile; they bring you down to their level, and beat you with experience.

                M 1 Reply Last reply
                0
                • M MikeBeard

                  All, I've a situation where I'd like to delete a directory and I'm told that I can't because something won't let me (I forget the exact message I got). It's a directory that I've created and I would think that I could delete it, but ... Is there a way (preferrably a utility of some sort) to determine what is holding onto it? Awhile back, I think that I remember someone asking about how to determine who is holding onto a file that couldn't be moved/deleted or something to that affect. Again, if I remember correctly, someone else said that there was a utility that would somehow determine who was holding/touching/whatever so that the OS wouldn't let it be operated on. Does this sound familar to anyone? I tried searching the lounge but apparently didn't remember the correct keywords. Any help would be greatly appreciated. Thanks, Mike

                  E Offline
                  E Offline
                  ednrgc
                  wrote on last edited by
                  #15

                  download Unlocker. It's a great program for exactly your problem.

                  M 1 Reply Last reply
                  0
                  • M malharone

                    It does .. search for a handle on a specific file name, and it'll list the processes that are locking the file. - Malhar

                    M Offline
                    M Offline
                    MikeBeard
                    wrote on last edited by
                    #16

                    Thanks!

                    1 Reply Last reply
                    0
                    • N NormDroid

                      I bet it's a service or driver.

                      Roger Irrelevant "he's completely hatstand"

                      M Offline
                      M Offline
                      MikeBeard
                      wrote on last edited by
                      #17

                      Yes, for some reason, SVCHOST.EXE had something open or locked or something. Very annoying.

                      1 Reply Last reply
                      0
                      • J jlwarlow

                        Process explorer; previously SysInternals, now part Microsoft. You can search for handles and then kill the process (as long as it's not a system process - you wouldn't want to kill those!) http://www.microsoft.com/technet/sysinternals/Utilities/ProcessExplorer.mspx[^]

                        Never argue with an imbecile; they bring you down to their level, and beat you with experience.

                        M Offline
                        M Offline
                        MikeBeard
                        wrote on last edited by
                        #18

                        Thanks. I found out it was SVCHOST.EXE that was holding on to it. Sigh.

                        UKCodeMonkey wrote:

                        Never argue with an imbecile; they bring you down to their level, and beat you with experience.

                        I like your sig. Makes WAY too much sense. :-D

                        1 Reply Last reply
                        0
                        • E ednrgc

                          download Unlocker. It's a great program for exactly your problem.

                          M Offline
                          M Offline
                          MikeBeard
                          wrote on last edited by
                          #19

                          Thanks! That was suggested along with ProcessMon. Both work great.

                          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