zipfromlist filename like cm_PackFiles

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
Hurdet
Power Member
Power Member
Posts: 716
Joined: 2003-05-10, 18:02 UTC

zipfromlist filename like cm_PackFiles

Post by *Hurdet »

I have:
[em_zip]
cmd=zipfromlist %TEMP%\zip.zip
param=%F

Do it is possible to set that instead of %TEMP%\zip.zip fix the destination is the name of the destination file is like what you get when you use the command cm_PackFiles ?
User avatar
petermad
Power Member
Power Member
Posts: 16144
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

Unfortunately the name of the file to which there has to be zipped has to be placed in the "Command" field, and TC does not support parameters like %F of %N in this field, so it doesn't seem to be possible.

Maybe by the use of some script engine like autohotkey...
License #524 (1994)
Danish Total Commander Translator
TC 11.55rc4 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1393a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
nsp
Power Member
Power Member
Posts: 1954
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Re: zipfromlist filename like cm_PackFiles

Post by *nsp »

Hurdet wrote:I have:
[em_zip]
cmd=zipfromlist %TEMP%\zip.zip
param=%F

Do it is possible to set that instead of %TEMP%\zip.zip fix the destination is the name of the destination file is like what you get when you use the command cm_PackFiles ?
A) Why not using a Packer ?

B) When you use cm_packfiles with "Zip" archive filename is %T[Current Folder].zip .
It is not possible to access the current folder name using a %code. You should embed your zip command inside a cmd script that can transform %T %P to what you need.

Code: Select all

@REM ZIPFROMLIST_WRAPPER.cmd
@echo off
set _ZNZME=%1
if NOT "%2" == "-" SET _ZNZME=%_ZNZME%%~n2.zip
zipfromlist "%_ZNZME%" "%3"
Change you user cmd to :

Code: Select all

[em_zip]
cmd=<parh_to>zipfromlist_wrapper
param=?%T . %F
With the ? you will be prompted in order to do manual change to validate change modify . to - !
With the %~n2 you transform the passed . to the current folder name as it is the default "start folder".

After you have to ensure that zipfromlist command read entire file list before returning...
Hurdet
Power Member
Power Member
Posts: 716
Joined: 2003-05-10, 18:02 UTC

Post by *Hurdet »

I obtain:
zipfromlist "C:\TEMP\TEST.ZIP" "C:\WINDOW\TEMP\CMDA8.tmp"
CMDA8.tmp have file list
But the zip is not created.
I would to try to use the internal zip via command line.
I trye to use WM_COMMAND but the zipfromlist exit before that zip is created.
User avatar
nsp
Power Member
Power Member
Posts: 1954
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Post by *nsp »

Hurdet wrote:I obtain:
zipfromlist "C:\TEMP\TEST.ZIP" "C:\WINDOW\TEMP\CMDA8.tmp"
CMDA8.tmp have file list
But the zip is not created.
I would to try to use the internal zip via command line.
I trye to use WM_COMMAND but the zipfromlist exit before that zip is created.
I was not aware that zipfromlist was an internal command :oops: as i never user it...

The only way to make it run is to have the zipname in the command area....
The wrapper idea is useless...
Post Reply