bulk delete certain types of files in rar/zip archive

Page 2 of 4 FirstFirst 1234 LastLast

  1. Posts : 2,177
    Windows 8.1 Pro x64
       #11

    You are correct about command prompt... we will go through it one step at a time though.
      My Computer


  2. Posts : 12,012
    Windows 7 Home Premium SP1, 64-bit
       #12

    kenny1999 said:
    how to open command prompt? start > cmd ????
    If you have absolutely no experience in navigation from a command prompt, it may be easier for you to use the script method that Dobbsy mentions.
      My Computer


  3. Posts : 2,177
    Windows 8.1 Pro x64
       #13

    Just tested againt a .zip file and it worked so working on the folder G:\zip_rar_copy\

    1. Open a command prompt
    (Click Start >> Type CMD >> Click CMD.exe from the search result)

    You now have the Command Prompt open...

    2. Lets change the directory/folder you are in - Type or copy/paste the following:
    Type G: then press enter
    Type cd G:\zip_rar_copy\ then press enter

    Example (although my letter is E:, your is G: )
    bulk delete certain types of files in rar/zip archive-2014-07-09-00_29_02-command-prompt.png


    You should now be in G:\zip_rar_copy\ (see my screenshot above for example)
    Before moving on... please confirm you get to this stage ok

    Cheers,
    Jamie
      My Computer


  4. Posts : 76
    Microsoft Windows 7 Home Premium 64-bit 7600 Multiprocessor Free
    Thread Starter
       #14

    JDobbsy1987 said:
    The script i posted that we will run will remove the specified file type(s) from the .rar file so don't extract them.

    I'm not sure if this will work against .zip file though... let me do a quick test
    thanks waiting for your result.
      My Computer


  5. Posts : 76
    Microsoft Windows 7 Home Premium 64-bit 7600 Multiprocessor Free
    Thread Starter
       #15

    JDobbsy1987 said:
    Just tested againt a .zip file and it worked so working on the folder G:\zip_rar_copy\

    1. Open a command prompt
    (Click Start >> Type CMD >> Click CMD.exe from the search result)

    You now have the Command Prompt open...

    2. Lets change the directory/folder you are in - Type or copy/paste the following:
    Type G: then press enter
    Type cd G:\zip_rar_copy\ then press enter

    Example (although my letter is E:, your is G: )
    bulk delete certain types of files in rar/zip archive-2014-07-09-00_29_02-command-prompt.png


    You should now be in G:\zip_rar_copy\ (see my screenshot above for example)
    Before moving on... please confirm you get to this stage ok

    Cheers,
    Jamie
    give me some time to study it first. Thanks
      My Computer


  6. Posts : 24,479
    Windows 7 Ultimate X64 SP1
       #16

    You can put copies of all the .rar/.zip files in one folder, Select all>extract here. Use the folder sorting option and sort in to Types. Now you can find all the .txt or html files easily.
    Problem with this is you'd have to re-compress all the remains back into separate files.
      My Computer


  7. Posts : 2,177
    Windows 8.1 Pro x64
       #17

    Britton30 said:
    You can put copies of all the .rar/.zip files in one folder, Select all>extract here. Use the folder sorting option and sort in to Types. Now you can find all the .txt or html files easily.
    Problem with this is you'd have to re-compress all the remains back into separate files.
    The script that i posted earlier will remove the specified file(s) from the zip/rar without the need to extract / zip up again

    We are about to get to that stage, just waiting for confirmation that the first steps mentioned above are completed.
      My Computer


  8. Posts : 76
    Microsoft Windows 7 Home Premium 64-bit 7600 Multiprocessor Free
    Thread Starter
       #18

    JDobbsy1987 said:
    Britton30 said:
    You can put copies of all the .rar/.zip files in one folder, Select all>extract here. Use the folder sorting option and sort in to Types. Now you can find all the .txt or html files easily.
    Problem with this is you'd have to re-compress all the remains back into separate files.
    The script that i posted earlier will remove the specified file(s) from the zip/rar without the need to extract / zip up again

    We are about to get to that stage, just waiting for confirmation that the first steps mentioned above are completed.
    The files are copying to the folder. It's 17Gb in total with 4XX files.
    It takes some time.

    I truly understand how to get to that folder by cmd.

    you may show me the next step following. Thank you very much
      My Computer


  9. Posts : 76
    Microsoft Windows 7 Home Premium 64-bit 7600 Multiprocessor Free
    Thread Starter
       #19

    I've gone to that stage? what should be the next?
      My Computer


  10. Posts : 2,177
    Windows 8.1 Pro x64
       #20

    WOW... that's a lot of zipped up stuff ha ha.

    Ok... starting where we left off, you are now within G:\zip_rar_copy\
    This is where the fun / potentially dangerous bit begins... hence the "copy" of data.
    Make sure you have WinRar installed - WinRAR archiver, a powerful tool to process RAR and ZIP files
    (Download link at the bottom of the page 'English 64-bit')


    Type or copy/paste the following into the command prompt:

    This is currently set to remove .txt files, change the .txt bit at the end of the line to the filetype you want to remove.
    Code:
    for %I in (*.rar) do "C:\Program Files\WinRAR\WinRAR.exe" d -ibck "%I" *.txt
    Once it finishes lets do the same but for .zip files...
    Notice the difference at the beginning, i have changed (*.rar) to (*.zip)

    This is currently set to remove .txt files, change the .txt bit at the end of the line to the filetype you want to remove.
    Code:
    for %I in (*.zip) do "C:\Program Files\WinRAR\WinRAR.exe" d -ibck "%I" *.txt

    Now, when you look in the rar/zip files you shouldn't see anything of the file types you have just removed

    Let me know how it goes.

    Regards,
    Jamie
      My Computer


 
Page 2 of 4 FirstFirst 1234 LastLast

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 10:00.
Find Us