• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 829
  • Last Modified:

zip a list of files whose file names are in a text file

How to zip a list of files whose file names are contained in a file.

For example, I have a file contains 10 file names with full path of the file name.  I like to zip the 10 files into one zip file.  How can I do it?
0
fungfat
Asked:
fungfat
  • 2
1 Solution
 
Brian PringleSystems Analyst II, SCM, ERPCommented:
You would need a licensed version of WinZip and would then have to download the WinZip Command Line Extensions.  You could then do a FOR loop to read in the contents of the file and use that to add the files in the list to your .zip file.

for /f %%a in (filelist.txt) do (
  winzip command
)

Here is a list of command line parameters.

http://www.memecode.com/docs/winzip.html
0
 
fungfatAuthor Commented:
Thanks btpringle.  Very thorough answer.  I have only the "evaluated" version, and no "command line" extension, so I cannot do the zipping with filelist yet.  But I believe I have it in the office.

I check the site you gave me and find all the parameters for the command line to zip with a file that contains the list of file names.  It is like the following:

     winzip -min -a -r myfile.zip filenames.txt
          where
              -min is to run in minimized mode
              -a is to add files to the zip file
              -r is for recursive, meaning include all subfolders
              myfile.zip is the result file
              filelist.txt contains all the file names to be zipped
         
0
 
MereteCommented:
the full version of winrar will do this, put them in a folder give it a name, ( TEM ) for an example purpose only,
 then  simply highlight the entire 10 and r/click them choose Add toTEMrar
It will either produce one RAR or if the files exceed a ceratin size it will spit them out into separate rar numbered 1 to the end.
Large files/games movies anything even  over 1 gig in size are compressed like this.
WinRAR
From Wikipedia, the free encyclopedia
http://en.wikipedia.org/wiki/WinRAR

http://www.win-rar.com/
0
 
fungfatAuthor Commented:
One mistake.  There must be a '@' in front of the filelist.txt to indicate to winzip that the file contains a list of files.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now