How to use "cm_PackFiles" with date YYYYMMDDHHMMSS ?

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
PiotrMPPL
Junior Member
Junior Member
Posts: 59
Joined: 2018-10-26, 07:04 UTC

How to use "cm_PackFiles" with date YYYYMMDDHHMMSS ?

Post by *PiotrMPPL »

Hi

How to use "cm_PackFiles" with date YYYYMMDDHHMMSS ?


Ex archiveYYYYMMDDHHMMSS.7z
User avatar
sqa_wizard
Power Member
Power Member
Posts: 3893
Joined: 2003-02-06, 11:41 UTC
Location: Germany

Re: How to use "cm_PackFiles" with date YYYYMMDDHHMMSS ?

Post by *sqa_wizard »

Try this button:

Code: Select all

TOTALCMD#BAR#DATA
cm_packfiles
/G /E="7-ZIP"  /T="archive_%|$DATE:YMDhms|%..7z"
wcmicons.dll,30
cm_packfiles archive


-1
#5767 Personal license
User avatar
petermad
Power Member
Power Member
Posts: 15999
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: How to use "cm_PackFiles" with date YYYYMMDDHHMMSS ?

Post by *petermad »

2sqa_wizard
sqa_wizard wrote:/G /E="7-ZIP" /T="archive_%|$DATE:YMDhms|%..7z"
I think it should be:

Code: Select all

%|$DATE:YMDhms|.7z
and not:

Code: Select all

%|$DATE:YMDhms|%..7z
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
PiotrMPPL
Junior Member
Junior Member
Posts: 59
Joined: 2018-10-26, 07:04 UTC

Re: How to use "cm_PackFiles" with date YYYYMMDDHHMMSS ?

Post by *PiotrMPPL »

Doesn't work... :(
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50390
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: How to use "cm_PackFiles" with date YYYYMMDDHHMMSS ?

Post by *ghisler(Author) »

petermad is right, the following works for me (packs the currently selected files or the file under the cursor):

Code: Select all

TOTALCMD#BAR#DATA
cm_packfiles
/G /E="7-ZIP"  /T="archive_%|$DATE:YMDhms|.7z"
wcmicons.dll,30
cm_packfiles archive


-1
Copy this code with Ctrl+C and paste it to the button bar via right click on empty space in the bar.
If it doesn't work, then your Total Commander is too old.
Author of Total Commander
https://www.ghisler.com
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6951
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: How to use "cm_PackFiles" with date YYYYMMDDHHMMSS ?

Post by *Horst.Epp »

I use this button.
It creates the archive in the target dir and the name is derived from the source dir.
For me, much better than always having the same base archive name.

Code: Select all

TOTALCMD#BAR#DATA
cm_packfiles
/G /E="7-ZIP"  /T="%T%B_%|$DATE:YMDhms|.7z"
wcmicons.dll,30
cm_packfiles archive


-1
Windows 11 Home, Version 24H2 (OS Build 26100.3915)
TC 11.51 x64 / x86
Everything 1.5.0.1391a (x64), Everything Toolbar 1.5.2.0, Listary Pro 6.3.2.88
QAP 11.6.4.2.1 x64
Post Reply