button: Zip/unzip (using tcmd internal zip packer AND zipfile path and path to be zipped specified in button)

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
t3ster
Junior Member
Junior Member
Posts: 13
Joined: 2023-09-05, 22:54 UTC

button: Zip/unzip (using tcmd internal zip packer AND zipfile path and path to be zipped specified in button)

Post by *t3ster »

Sorry for this simple question but I coudn't find the solution for this.
I want a button that zips the folder "d:\test" to "e:\backup.zip" with overwrite (not asking me to overwrite).

1)
I did the following:
Created "em_backup" in "usercmd.ini".
But what do I enter in 'cmd' to call the totalcommander internal zip packer and what do inter in 'param'
I know param must contain "d:\test" AND "e:\backup.zip" but what is the correct syntax?
----------
cmd= <---- ?
param= <---?
----------
I have the above "em_backup" ready in a button.

2)
Is it also possible to do this without a user command?
Meaning: directly in a button, by entering the correct info in the 'Command:' and 'Parameters:' inputfield of that button?

- I can do this easily with 7zip or any other tool, I was curious if I could do it using total commander's internal zip packer only.
- cm_CopyToArchive uses input from the totalcommander folderpane, but in my request I have predefined paths: "d:\test" AND "e:\backup.zip"
User avatar
petermad
Power Member
Power Member
Posts: 16027
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: button: Zip/unzip (using tcmd internal zip packer AND zipfile path and path to be zipped specified in button)

Post by *petermad »

2t3ster
You can do it with the ZIPFROMLIST command

Code: Select all

cmd=ZIPFROMLIST -o "e:\backup.zip"
param=e:\list.txt
You have to make a file e:\list.txt with the content:

Code: Select all

d:\test\*.*
the list.txt can be located anywhere. Do not put quotes around drive:\path\list.txt in the param line.

You can use it directly in a button, you don't need an em_command.
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
Post Reply