batch file help - extraction

Reply

Join Date: May 2004
Posts: 217
Reputation: marceta is an unknown quantity at this point 
Solved Threads: 0
marceta marceta is offline Offline
Posting Whiz in Training

batch file help - extraction

 
0
  #1
Jul 22nd, 2004
Hello everyone. I would like to make a batch file that extracts the contents of MANY .zip files (<name>001-146) to a certain folder, without having to manually extract them. My .bat skills are not good enough to do it and it would be a usuful tool that i currently need. Can someone please post the batch code that will do this.

many thanks in advance.
Reply With Quote Quick reply to this message  
Join Date: Mar 2004
Posts: 1,620
Reputation: kc0arf is a jewel in the rough kc0arf is a jewel in the rough kc0arf is a jewel in the rough 
Solved Threads: 51
Team Colleague
kc0arf kc0arf is offline Offline
Posting Virtuoso

Re: batch file help - extraction

 
0
  #2
Jul 22nd, 2004
Hello,

The older DOS PKUNZIP might work for you. I wonder if WinZip has something like that available too.

I wonder if you could instead of getting a bunch of .ZIP files, if your source could send you ONE zip file with everything inside it.

You cannot just go PKUNZIP *.ZIP as your files would be placed in the working folder and be mingling with your .ZIP files too. That would be bad.

Good luck on this one.
Reply With Quote Quick reply to this message  
Join Date: May 2004
Posts: 217
Reputation: marceta is an unknown quantity at this point 
Solved Threads: 0
marceta marceta is offline Offline
Posting Whiz in Training

Re: batch file help - extraction

 
0
  #3
Jul 22nd, 2004
thx for tryin, winzip cant do it and i am NOT prepared to do it myself does anyone know how to do it?
Reply With Quote Quick reply to this message  
Join Date: Jul 2004
Posts: 494
Reputation: Puckdropper is an unknown quantity at this point 
Solved Threads: 21
Puckdropper Puckdropper is offline Offline
Posting Pro in Training

Re: batch file help - extraction

 
0
  #4
Jul 22nd, 2004
Can you extract them from the command line how you want? If not, the rest of the post won't be very useful.

To get a file listing of all the zip files in a directory, use:

dir *.zip /b > names.txt

your batch file may go something like this (stick with me, I'm used to Linux)
Oh, and one more note: I use binary numbers for temporary directory names just so I can practice binary.

mkdir 00000000
cd 00000000
unzip ../filename.zip
cd ..

mkdir 00000001
cd 00000001
unzip ../filename2.zip
cd ..

and so on...
Last edited by Puckdropper; Jul 22nd, 2004 at 4:03 am. Reason: Clarity
www.uncreativelabs.net

Old computers are getting to be a lost art. Here at Uncreative Labs, we still enjoy using the old computers. Sometimes we want to see how far a particular system can go, other times we use a stock system to remind ourselves of what we once had.
Reply With Quote Quick reply to this message  
Join Date: May 2004
Posts: 217
Reputation: marceta is an unknown quantity at this point 
Solved Threads: 0
marceta marceta is offline Offline
Posting Whiz in Training

Re: batch file help - extraction

 
0
  #5
Jul 22nd, 2004
cool man, thx. Ive got the list of files, now, i cant the extract to work. i have

"unzip /<filename><no.>.zip

but no good. is it something to do with those numbers (i dont really get them)
Reply With Quote Quick reply to this message  
Join Date: Mar 2004
Posts: 3,826
Reputation: Catweazle is a jewel in the rough Catweazle is a jewel in the rough Catweazle is a jewel in the rough Catweazle is a jewel in the rough 
Solved Threads: 144
Team Colleague
Catweazle Catweazle is offline Offline
Grandad

Re: batch file help - extraction

 
0
  #6
Jul 22nd, 2004
Hey marceta. Have you considered that some of those zip archives might contain files with the same filename? Extracting all the archives into the one directory as a 'batch' operation might not be the wisest thing to do. You might just end up with some files lost from the exercise
Reply With Quote Quick reply to this message  
Join Date: May 2004
Posts: 217
Reputation: marceta is an unknown quantity at this point 
Solved Threads: 0
marceta marceta is offline Offline
Posting Whiz in Training

Re: batch file help - extraction

 
0
  #7
Jul 22nd, 2004
well it took about 30mins, but i did it all by hand, i guess i should feel proud, but i dont
Reply With Quote Quick reply to this message  
Join Date: Jul 2004
Posts: 494
Reputation: Puckdropper is an unknown quantity at this point 
Solved Threads: 21
Puckdropper Puckdropper is offline Offline
Posting Pro in Training

Re: batch file help - extraction

 
0
  #8
Jul 22nd, 2004
Go and celebrate by having a nice cold can of root beer. I find Barqs is best Ice Cold. ;-)
www.uncreativelabs.net

Old computers are getting to be a lost art. Here at Uncreative Labs, we still enjoy using the old computers. Sometimes we want to see how far a particular system can go, other times we use a stock system to remind ourselves of what we once had.
Reply With Quote Quick reply to this message  
Join Date: May 2004
Posts: 86
Reputation: JR85023 is an unknown quantity at this point 
Solved Threads: 6
JR85023's Avatar
JR85023 JR85023 is offline Offline
Junior Poster in Training

Re: batch file help - extraction

 
0
  #9
Jul 22nd, 2004
WINRAR Can do batches.
Before God we are all equally wise - and equally foolish. - Albert Einstein
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Windows NT / 2000 / XP Forum


Views: 11126 | Replies: 8
Thread Tools Search this Thread



Tag cloud for Windows NT / 2000 / XP
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC