Add Date and Time to archive name in pack option

Here you can propose new features, make suggestions etc.

Moderators: Hacker, petermad, Stefan2, white

Post Reply
hoegge
Junior Member
Junior Member
Posts: 10
Joined: 2005-09-28, 12:48 UTC

Add Date and Time to archive name in pack option

Post by *hoegge »

Long time user of TC (decades). One thing I would really like to see that would be very useful, would be the having an option in the pack dialog to enable adding date and time at the end of the file name, so instead of a name like

c:\temp\files.zip

you get

c:\temp\files 2025-04-01 10:32:31.zip

and really greate if the could be a text field next to the option where you could define your own time format. yyyy-MM-dd hh:mm:ss

that it remembers including the option check box state so you can keep it on.

Use case: saving new versions of files and folders compressed without having to rename them every time and add date info.

Thanks.
Morten H Pedersen
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6950
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: Add Date and Time to archive name in pack option

Post by *Horst.Epp »

Make a button like this and adapt it for your needs.

Code: Select all

TOTALCMD#BAR#DATA
cm_packfiles
/G /E="7-ZIP"  /T="%T%B_%|$DATE:YMD_hm|.7z"
wcmicons.dll,30
Pack selected as 7z to target with name of current dir


-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
User avatar
Dalai
Power Member
Power Member
Posts: 9941
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: Add Date and Time to archive name in pack option

Post by *Dalai »

2hoegge
A colon is not a valid character to use in filenames. Not only that, it's used to separate NTFS alternate data streams (ADS) from the filename, and everything following the colon is the ADS name.
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
hoegge
Junior Member
Junior Member
Posts: 10
Joined: 2005-09-28, 12:48 UTC

Re: Add Date and Time to archive name in pack option

Post by *hoegge »

Thanks .. was not aware the cm_pack could take arguments - thanks - and works with internal compressor too, so have ended up using this line, where the source filename or folder name is used:

/G /E="ZIP" /T="%T%O %|$DATE:Y-M-D h.m.s|.zip"

Thanks horst.epp

/Hoegge
Morten H Pedersen
Post Reply