ZIPFROMLIST command: request for additional parameter to pack only relative paths to source dir
Moderators: Hacker, petermad, Stefan2, white
ZIPFROMLIST command: request for additional parameter to pack only relative paths to source dir
Currently ZIPFROMLIST internal command packs the source paths as they are stored, except the drive letter, in the list which is passed to this command.
In the list, the absolute paths are stored, so if we're in c:\test\ with a file "name.ext" packing that file with a ZIPFROMLIST button, in the target archive the file "name.ext" will be inside of /test/ directory.
Since I rarely need upper directory tree in the file, as a workaround I currently use a subst command to make currrent TC's path as a root of a drive and then pack the files/dirs I need with ZIPFROMLIST command from that drive. This workaround requires additional actions each time when archive is created, so my suggestion is to add a parameter for ZIPFROMLIST command make it work more like Alt+F5 packing which stores only the paths relative to the source directory.
In the list, the absolute paths are stored, so if we're in c:\test\ with a file "name.ext" packing that file with a ZIPFROMLIST button, in the target archive the file "name.ext" will be inside of /test/ directory.
Since I rarely need upper directory tree in the file, as a workaround I currently use a subst command to make currrent TC's path as a root of a drive and then pack the files/dirs I need with ZIPFROMLIST command from that drive. This workaround requires additional actions each time when archive is created, so my suggestion is to add a parameter for ZIPFROMLIST command make it work more like Alt+F5 packing which stores only the paths relative to the source directory.
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
Ukraine's National Bank special bank account:
UA843000010000000047330992708
- ghisler(Author)
- Site Admin
- Posts: 50561
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: ZIPFROMLIST command: request for additional parameter to pack only relative paths to source dir
ZIPFROMLIST supports relative paths - relative to the location of the list file. The files will be packed with these relative paths only.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: ZIPFROMLIST command: request for additional parameter to pack only relative paths to source dir
2DrShark
A command like this works perfectly to pack with relative path:
If you use %UL instead of %UF, then you will get full path in the archive.
A command like this works perfectly to pack with relative path:
Code: Select all
[em_zipfromlist]
cmd=ZIPFROMLIST -o
param="%O.zip" %UF
menu=Pack selected items to archive with name as file under cursor - in same folder
button=wcmicons.dll,30
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Re: ZIPFROMLIST command: request for additional parameter to pack only relative paths to source dir
2petermad
Thanks, with %UF it works!
My changed button now:
Topic can be moved to English forum.
Thanks, with %UF it works!
My changed button now:
Code: Select all
TOTALCMD#BAR#DATA
ZIPFROMLIST -10
"%O%E.zip" %UF
%COMMANDER_PATH%\TOTALCMD64.EXE,21
Pack ZIPX
-1
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
Ukraine's National Bank special bank account:
UA843000010000000047330992708
Re: ZIPFROMLIST command: request for additional parameter to pack only relative paths to source dir
I noticed that you used 10 for compression rate - and it works, even though the specification only mentions 9 as max value:
I will make a report about that.history.txt wrote:22.01.13 Added: Buttonbar command ZIPFROMLIST now supports parameters: -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 (32/64)
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Re: ZIPFROMLIST command: request for additional parameter to pack only relative paths to source dir
Yes, I use rate 10 with ZIPFROMLIST when I need archive with higher compression, and with Alt+F5 I pack to ZIP with compression rate 9 when I need more compatible ZIP files.
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
Ukraine's National Bank special bank account:
UA843000010000000047330992708
Re: ZIPFROMLIST command: request for additional parameter to pack only relative paths to source dir
Moderator message from: "Hacker"
Moved to the English forum.
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.