Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: bulk delete certain types of files in rar/zip archive

08 Jul 2014   #11
JDobbsy1987

Windows 8.1 Pro x64
 
 

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


My System SpecsSystem Spec
.
08 Jul 2014   #12
ignatzatsonic

Microsoft Community Contributor Award Recipient

Windows 7 Home Premium SP1, 64-bit
 
 

Quote   Quote: Originally Posted by kenny1999 View Post
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 System SpecsSystem Spec
08 Jul 2014   #13
JDobbsy1987

Windows 8.1 Pro x64
 
 

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 System SpecsSystem Spec
.

08 Jul 2014   #14
kenny1999

Microsoft Windows 7 Home Premium 64-bit 7600 Multiprocessor Free
 
 

Quote   Quote: Originally Posted by JDobbsy1987 View Post
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 System SpecsSystem Spec
08 Jul 2014   #15
kenny1999

Microsoft Windows 7 Home Premium 64-bit 7600 Multiprocessor Free
 
 

Quote   Quote: Originally Posted by JDobbsy1987 View Post
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: )
Attachment 324781


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 System SpecsSystem Spec
08 Jul 2014   #16
Britton30
Microsoft MVP

Windows 7 Ultimate X64 SP1
 
 

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 System SpecsSystem Spec
08 Jul 2014   #17
JDobbsy1987

Windows 8.1 Pro x64
 
 

Quote   Quote: Originally Posted by Britton30 View Post
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 System SpecsSystem Spec
08 Jul 2014   #18
kenny1999

Microsoft Windows 7 Home Premium 64-bit 7600 Multiprocessor Free
 
 

Quote   Quote: Originally Posted by JDobbsy1987 View Post
Quote   Quote: Originally Posted by Britton30 View Post
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 System SpecsSystem Spec
08 Jul 2014   #19
kenny1999

Microsoft Windows 7 Home Premium 64-bit 7600 Multiprocessor Free
 
 

I've gone to that stage? what should be the next?
My System SpecsSystem Spec
08 Jul 2014   #20
JDobbsy1987

Windows 8.1 Pro x64
 
 

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 System SpecsSystem Spec
Reply

 bulk delete certain types of files in rar/zip archive




Thread Tools Search this Thread
Search this Thread:

Advanced Search




Similar help and support threads
Thread Forum
How to add to RAR archive 40k files without using windows search.
I have over 40 thousand files I need to archive spread throughout a drive in different folders. I cannot use windows search because the drive cannot be index and will take quite some time to fix and solve. Is there another method that can allow me to search a drive and add to winrar .rar archive?...
General Discussion
BULK creating of folders based on file names, and then moving files in
Hi Everyone, i have been looking for weeks for a way to do this and i have tried so many applications but i just cant seem to get it right, i was hoping that you guys my be able to help me out here with this one.. i have two folders, at the moment with identical file names in the ( they...
General Discussion
Bulk delete parts of filenames?
I have a lot of files (songs) which names are of the following type: xxxx - yyyy Where x represents the artist's name and y represents the song's name. Now, I need a way to bulk edit these files so that everything left of the hyphen is removed and later on the hyphen itself so that the...
General Discussion
BSOD copying bulk files from ext. HDD
Hi all, I have a 1TB external HDD attached to my laptop. Whenever I attempt to copy multiple files to another HDD I am confronted with a BSOD. Can anyone read the dumpfile and see what my issue is, please? Thanks, Ed
BSOD Help and Support
removing damaged archive files?
Running win 7. Just scanned my C drive w/ESET and the scan turned up several damaged archived files (see below). Should I: 1. Delete the damaged archived files shown trusting that there won't be any repercussions later? 2. Leave everything as is and forget about it? 3. Any reason not to...
General Discussion
Windows 7 saving bulk files
I have received a link which has 50 jpg files in it. I opened the link and all the pictures are there. I clicked on select all and all files are highlighted and i clicked on save as but only one file is saved. Could you tell me, how can i save all of the 50 pictures to my pictures in bulk at...
General Discussion


Our Sites

Site Links

About Us

Find 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 22:03.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App