How to add to a zip archive from the commandline all files from a filelist in a textfile ?

T

Tom Parson

I have a textfile where hundereds of files (with path) are listed.

Now I want to add all these files to a (win)zip archive.
How do I do this from the command line ?

Using a DOS batch procedure with a command like:

for /F "tokens=*" %%* in (myfiles.lst) do zip "myarchive.zip" "%%*"

is not useful since the zip program needs to close and re-open the zip archive
for each file separately which is rather time consuming (20 times longer
than adding all files in one step)!

Is there a syntax which allows me to add all files in one step?

Tom
 
B

billious

Tom Parson said:
I have a textfile where hundereds of files (with path) are listed.

Now I want to add all these files to a (win)zip archive.
How do I do this from the command line ?

Using a DOS batch procedure with a command like:

for /F "tokens=*" %%* in (myfiles.lst) do zip "myarchive.zip" "%%*"

is not useful since the zip program needs to close and re-open the zip
archive
for each file separately which is rather time consuming (20 times longer
than adding all files in one step)!

Is there a syntax which allows me to add all files in one step?

Tom

Using the winzip command-line module:

(from the documentation accessible using WZZIP/? from the prompt...)

wzzip [options] zipfile [@listfile] [files...]

Where listfile is a textfile containing filenames one to a line; wildcards
supported.

HTH

....Bill
 
D

David J Dachtera

Tom said:
I have a textfile where hundereds of files (with path) are listed.

Now I want to add all these files to a (win)zip archive.
How do I do this from the command line ?

Using a DOS batch procedure with a command like:

for /F "tokens=*" %%* in (myfiles.lst) do zip "myarchive.zip" "%%*"

is not useful since the zip program needs to close and re-open the zip archive
for each file separately which is rather time consuming (20 times longer
than adding all files in one step)!

Is there a syntax which allows me to add all files in one step?

Well, not sure about WinZIP, but the freeware zip program from InfoZip
supports a "-@" option, which should work like so:

type myfiles.lst | zip myarchive.zip -@

....although I lack the facilities to test that here.

--
David J Dachtera
dba DJE Systems
http://www.djesys.com/

Unofficial OpenVMS Hobbyist Support Page:
http://www.djesys.com/vms/support/

Unofficial Affordable OpenVMS Home Page:
http://www.djesys.com/vms/soho/

Unofficial OpenVMS-IA32 Home Page:
http://www.djesys.com/vms/ia32/

Coming soon:
Unofficial OpenVMS Marketing Home Page
 
G

Guest

Well, not sure about WinZIP, but the freeware zip program from InfoZip
supports a "-@" option, which should work like so:

type myfiles.lst | zip myarchive.zip -@

...although I lack the facilities to test that here.

You can get an optional command line support add-on for Winzip from
http://winzip.com - this supports the -@ and @ options (to create and to
use a listfile).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top