Welcome Guest.   Make a donation to an author on the site August 21, 2014, 03:15:45 AM  *

Please login or register.
Or did you miss your validation email?


Login with username and password (forgot your password?)
Why not become a lifetime supporting member of the site with a one-time donation of any amount? Your donation entitles you to a ton of additional benefits, including access to exclusive discounts and downloads, the ability to enter monthly free software drawings, and a single non-expiring license key for all of our programs.


You must sign up here before you can post and access some areas of the site. Registration is totally free and confidential.
 
Read the Practical Guide to DonationCoder.com Forum Search Features
   
   Forum Home   Thread Marks Chat! Downloads Search Login Register  
Pages: [1]   Go Down
  Reply  |  New Topic  |  Print  
Author Topic: IDEA: automate delete files from a .7z archive  (Read 5012 times)
3dpinballchamp
Participant
*
Posts: 7


View Profile Give some DonationCredits to this forum member
« on: March 22, 2012, 05:30:31 AM »

i want to delete certain files from 7zip archives,
i have a list of files to delete, any way to automate the task?
thanks
Logged
db90h
Coding Snacks Author
Charter Member
***
Posts: 455


Software Engineer

View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #1 on: March 22, 2012, 06:42:27 AM »

Yes, simple. Use the command line version of 7z, named 7z.exe. Then with a simple command to it (run it to get help) you can delete files from the archive. Create a batch file if you need to do more than one operation.
Logged
3dpinballchamp
Participant
*
Posts: 7


View Profile Give some DonationCredits to this forum member
« Reply #2 on: March 22, 2012, 09:40:18 AM »

how can i use it for the task? all the 7z files are in one folder and the list doesnot
Logged
db90h
Coding Snacks Author
Charter Member
***
Posts: 455


Software Engineer

View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #3 on: March 22, 2012, 10:18:04 AM »

I am sure someone here has the time to explain it to ya.. there are multiple people more than qualified. It's really very easy stuff at the command line. I wish I had more time, sorry. If I do get more time, I'll try to help. It is doable though, and easier than you think.

If you have multiple files to work on, a BATCH file with a file based loop will work great. There are plenty of BATCH experts here I'm sure.
Logged
skwire
Moderator
*****
Posts: 4,025



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #4 on: March 22, 2012, 11:09:04 AM »

What sort of format is the list of files to delete in?  One filename per line?  Is the path included?  If possible, can you post a snippet of the file?
Logged

3dpinballchamp
Participant
*
Posts: 7


View Profile Give some DonationCredits to this forum member
« Reply #5 on: March 22, 2012, 11:17:34 AM »

[copy or print]
First Seven Zip Archive
File 0001
File 0002
File 0003
File 0004
File 0005

Another Seven Zip Archive
MoreFiles 0001
MoreFiles 0002
MoreFiles 0003
MoreFiles 0004
MoreFiles 0005

the entire list is like that, also all the files are the same file-format.
it is in alphabetical order.
Logged
Pages: [1]   Go Up
  Reply  |  New Topic  |  Print  
 
Jump to:  
   Forum Home   Thread Marks Chat! Downloads Search Login Register  

DonationCoder.com | About Us
DonationCoder.com Forum | Powered by SMF
[ Page time: 0.03s | Server load: 0.26 ]