lst to zip on the command line

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
jmwap
Member
Member
Posts: 121
Joined: 2008-03-23, 12:40 UTC

lst to zip on the command line

Post by *jmwap »

Hi,

I have a lst file (created by a plugin I think). Now I need to get a zip containing the files mentioned in the lst. I need to do this on a command line. Is there some easy way? I am trying to think of some way of leveraging TC to do this but I am short of ideas (it needs to be programatically, from command line).

thanks!
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6450
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Post by *Horst.Epp »

You can try the 7zip command line.
It supports the -i @listfile parameter for the files to be packed.
In general it looks like:
$ 7z a -t[specify-type-of-archive] [archive-filename] [file-to-archive]
If you realy want a zip file and using your listfile:
$ 7z a -tzip archive-filename -i @listfile
Windows 11 Home x64 Version 23H2 (OS Build 22631.3374)
TC 11.03 x64 / x86
Everything 1.5.0.1371a (x64), Everything Toolbar 1.3.2, Listary Pro 6.3.0.69
QAP 11.6.3.2 x64
User avatar
Hacker
Moderator
Moderator
Posts: 13052
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

jmwap,
TC Help File wrote:With the command zipfromlist, you can create a zip file from a list of files. The command field must contain the zip file name, and the parameters field the name of the list file. The list file must contain a list of files to be packed, one file per line. Now supports the following parameters, put in front of the zip file name: -m move, -o overwrite without asking, -0 .. -9 compression rate, -c0 encrypt (zip20), -c1 AES128, -c2 AES192, -c3 AES256, -c0pass .. -c3pass encrypt with given password
Not sure what exactly you mean by "from the command line", the closest to that would be an alias.
If you need to use an external program then disregard this solution.

HTH
Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
jmwap
Member
Member
Posts: 121
Joined: 2008-03-23, 12:40 UTC

Post by *jmwap »

Horst.Epp wrote:You can try the 7zip command line.
It supports the -i @listfile parameter for the files to be packed.
In general it looks like:
$ 7z a -t[specify-type-of-archive] [archive-filename] [file-to-archive]
If you realy want a zip file and using your listfile:
$ 7z a -tzip archive-filename -i @listfile
excellent Horst, exactly what I needed!

Just a note though, I needed to change it to
7z a -tzip archive.zip @listfile.txt
(no -i) for me to work.

Hacker: by command line I meant from the cmd.exe terminal.
Post Reply