Multiple File Delete

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ShadowLocke
    New Member
    • Jan 2008
    • 116

    Multiple File Delete

    Hi all,

    I am frustrated with windows when trying to delete large amounts of temp files. Ill select all then press delete, but when it gets to one file that may be open it rightfully errors. I seem to recall a way to have it continue on deleting after encountering the error instead of just stopping (either tool or setting..) but i just cant remember.

    Ive tried the command prompt "del *.*" but it doesnt hit sub directories or hidden files.

    Any pointers?

    Thanks,
  • Stang02GT
    Recognized Expert Top Contributor
    • Jun 2007
    • 1206

    #2
    Originally posted by ShadowLocke
    Hi all,

    but when it gets to one file that may be open it rightfully errors.

    Thanks,

    If you are trying to delete files that are open it won't delete and you will continue to get errors. make sure everything is closed before you delete things.



    And im not sure if there is a way you can turn those errors off, but i don't think you can

    Comment

    • ShadowLocke
      New Member
      • Jan 2008
      • 116

      #3
      Originally posted by Stang02GT
      If you are trying to delete files that are open it won't delete and you will continue to get errors. make sure everything is closed before you delete things.



      And im not sure if there is a way you can turn those errors off, but i don't think you can

      Nah..theres defenitly something..alth ough..im starting to think i may have just wrote a script that did it for me...

      Comment

      • jg007
        Contributor
        • Mar 2008
        • 283

        #4
        Originally posted by ShadowLocke
        Nah..theres defenitly something..alth ough..im starting to think i may have just wrote a script that did it for me...
        misread the question and could find how to delete the sill reply :)

        Comment

        • ShadowLocke
          New Member
          • Jan 2008
          • 116

          #5
          Came accross this again, found a solution through dos


          del *.* /q /f /a:H /a:S /a:A
          rd <dir> /s

          or better

          :: Remove all files and subfolders but NOT the root folder
          :: From tip 617 at JsiFAQ.com
          @echo off
          pushd %1
          del *.* /q /f /a:H /a:S /a:A
          for /f "Tokens=*" %%G in ('dir /B') do rd /s /q "%%G"
          popd
          Last edited by ShadowLocke; May 22 '08, 08:55 PM. Reason: Including hidden files and read only

          Comment

          • questionit
            Contributor
            • Feb 2007
            • 553

            #6
            Originally posted by ShadowLocke
            Came accross this again, found a solution through dos


            del *.* /q /f /a:H /a:S /a:A
            rd <dir> /s

            or better

            :: Remove all files and subfolders but NOT the root folder
            :: From tip 617 at JsiFAQ.com
            @echo off
            pushd %1
            del *.* /q /f /a:H /a:S /a:A
            for /f "Tokens=*" %%G in ('dir /B') do rd /s /q "%%G"
            popd
            Are you sure this command will delete folders besides files?

            Why not use Windows Disk cleaner, which can delete temporary files as well- without needing to delete them manually.

            Qi

            Comment

            • AmberJain
              Recognized Expert Contributor
              • Jan 2008
              • 922

              #7
              Originally posted by ShadowLocke
              Came accross this again, found a solution through dos


              del *.* /q /f /a:H /a:S /a:A
              rd <dir> /s

              or better

              :: Remove all files and subfolders but NOT the root folder
              :: From tip 617 at JsiFAQ.com
              @echo off
              pushd %1
              del *.* /q /f /a:H /a:S /a:A
              for /f "Tokens=*" %%G in ('dir /B') do rd /s /q "%%G"
              popd
              This method is not preferred due to certain reasons---->

              1. This is too cumbersome or "not user friendly" as it uses DOS commands which are not suitable for a normal minimal XP user (although if you are a dos lover like me, then you can certainly follow this step)

              2. This still does not solves the problem which you mentioned earlier---->
              Originally posted by ShadowLocke
              I am frustrated with windows when trying to delete large amounts of temp files. Ill select all then press delete, but when it gets to one file that may be open it rightfully errors.
              i.e. if the file is used by another process, even DOS's delete command ["del *.* /q /f /a:H /a:S /a:A" as you suggested] cannot delete the file.

              3. I agree with Questionit on his following reply -------------->
              Originally posted by questionit
              Are you sure this command will delete folders besides files?
              Why not use Windows Disk cleaner, which can delete temporary files as well- without needing to delete them manually.
              Good work questionit..... ..I expected this from you. But I think even Windows Disk cleaner will not be able to delete files which are in use by other processes.
              ||||||||||||||| ||||||||||||||| ||||||||||||||| ||||||||||||||| ||||||||||||||| ||||||||||||||| ||||||||||||||| ||||||||||||||| ||||||||||||||| ||||||||||||||| |||

              So is there any solution to this problem?
              YES, there's certainly a solution....... .......

              There are many of utilities online which help you perform the desired task PLUS overcome all the problems mentioned above.

              Click on the link below to goto the page of a very fine utility called "UNLOCKER".
              LINK

              On that page you will find names of various other similar (and useful) utilities under the heading - "Similar programs and why Unlocker is better".

              Now, simply download "UNLOCKER" and then install it. Then simply open the folder in which you want to delete large amounts of temporary (or any other kind) files. Press [CTRL+a] to select all the files and folders .Then right click any selected folder and select "Unlocker" option. In unlocker's window, if any locking handles for any of selected files/folders are found, then click on [UNLOCK] option and select "delete" option on the left bottom corner.

              This will do your job.

              _______________ _______________ _______________ _______________ ______
              NOTE ---- This utility can be useful when dealing with "deletion of viruses" as some of the virus are simply not deletable. You can virtually delete any virus using this tool.
              _______________ _______________ _______________ _______________ ______
              HOPE THIS HELPS.......... .....

              ==============
              =AmbrNewlearner =
              ==============

              Comment

              • questionit
                Contributor
                • Feb 2007
                • 553

                #8
                Originally posted by ambrnewlearner
                This method is not preferred due to certain reasons---->



                1. This is too cumbersome or "not user friendly" as it uses DOS commands which are not suitable for a normal minimal XP user (although if you are a dos lover like me, then you can certainly follow this step)

                2. This still does not solves the problem which you mentioned earlier---->

                i.e. if the file is used by another process, even DOS's delete command ["del *.* /q /f /a:H /a:S /a:A" as you suggested] cannot delete the file.

                3. I agree with Questionit on his following reply -------------->

                Good work questionit..... ..I expected this from you. But I think even Windows Disk cleaner will not be able to delete files which are in use by other processes.
                ||||||||||||||| ||||||||||||||| ||||||||||||||| ||||||||||||||| ||||||||||||||| ||||||||||||||| ||||||||||||||| ||||||||||||||| ||||||||||||||| ||||||||||||||| |||

                So is there any solution to this problem?
                YES, there's certainly a solution....... .......

                There are many of utilities online which help you perform the desired task PLUS overcome all the problems mentioned above.

                Click on the link below to goto the page of a very fine utility called "UNLOCKER".
                LINK

                On that page you will find names of various other similar (and useful) utilities under the heading - "Similar programs and why Unlocker is better".

                Now, simply download "UNLOCKER" and then install it. Then simply open the folder in which you want to delete large amounts of temporary (or any other kind) files. Press [CTRL+a] to select all the files and folders .Then right click any selected folder and select "Unlocker" option. In unlocker's window, if any locking handles for any of selected files/folders are found, then click on [UNLOCK] option and select "delete" option on the left bottom corner.

                This will do your job.

                _______________ _______________ _______________ _______________ ______
                NOTE ---- This utility can be useful when dealing with "deletion of viruses" as some of the virus are simply not deletable. You can virtually delete any virus using this tool.
                _______________ _______________ _______________ _______________ ______
                HOPE THIS HELPS.......... .....

                ==============
                =AmbrNewlearner =
                ==============
                Hi all

                --The following is more about ending a process that is currently running (so that you can delete the files you want)

                There are atleast 2 methods within Windows you can use to end a process that is currently running.

                1- Use Command Prompt's command: taskkill

                2- If nothing helps then follow these steps:
                - Open Command Prompt
                - open Windows Task Manager
                - close explorer.exe from task manager
                - delete file you want to delete from Command Prompt - it will let you delete now!
                - from Windows Task Manager, open explorer.exe

                3- One can use VBScript to run the taskkill command or to do similar thing. It will be handy, as you can specify which files to kill/stop and then which ones to delete. This Vb Script can be run by just a double-click

                Hope it helps?
                Qi

                Comment

                • AmberJain
                  Recognized Expert Contributor
                  • Jan 2008
                  • 922

                  #9
                  Originally posted by questionit
                  Hi all

                  --The following is more about ending a process that is currently running (so that you can delete the files you want)

                  There are atleast 2 methods within Windows you can use to end a process that is currently running.

                  1- Use Command Prompt's command: taskkill

                  2- If nothing helps then follow these steps:
                  - Open Command Prompt
                  - open Windows Task Manager
                  - close explorer.exe from task manager
                  - delete file you want to delete from Command Prompt - it will let you delete now!
                  - from Windows Task Manager, open explorer.exe

                  3- One can use VBScript to run the taskkill command or to do similar thing. It will be handy, as you can specify which files to kill/stop and then which ones to delete. This Vb Script can be run by just a double-click

                  Hope it helps?
                  Qi
                  Method 1 works really fine. So no doubts about it.

                  Method 2 --> If the file is running or is in use by another process, then this method still cannot delete the file directly. I mean to say that we still need to end processes associated with that file by method 1 (which you suggested above) or from task manager. So do you have anything else to say about this method?

                  Method 3 --> I don't know much about VBScript and so NO COMMENTS about method 3.

                  _______________ _______________ _______________ _______________ _____
                  HOPE THIS HELPS..........
                  ==============
                  =AmbrNewlearner =
                  ==============

                  Comment

                  Working...