timestamp (yyyymmdd) as prefix to the Pack archive name

Here you can propose new features, make suggestions etc.

Moderators: white, Hacker, petermad, Stefan2

Post Reply
jde
Junior Member
Junior Member
Posts: 4
Joined: 2005-04-07, 09:59 UTC

timestamp (yyyymmdd) as prefix to the Pack archive name

Post by *jde »

I'm zipping (packing) a lot.

OftenI need a zip-file-name with the timestamp as a prefix.

Your recent default suggestion of the filename is really good. And with with option I think it can be perfect.

recent good default
[complete pathname]\[recent directroy name][.kind of zip]

perfect default:

[complete pathname]\[recent directroy name][.kind of zip]
+
[optional timstamp]
=
[complete pathname]\[optional timstamp].[recent directroy name][.kind of zip]


The [optional timstamp] is choicable via checkbox at the "pack files" dalog and the format is yyyymmdd (or defined in the .ini)

Thanx a lot.
Juergen
hi5
Power Member
Power Member
Posts: 551
Joined: 2012-11-03, 11:35 UTC
Contact:

Re: timestamp (yyyymmdd) as prefix to the Pack archive name

Post by *hi5 »

I would second such a request and like to request similar "place holders" which are now already available when you create a new directory (F7) or a new file (Shift-F4) such as:

[ymd]
[hms]
[d]
[t]
etc

Perhaps special consideration for a COUNTER which would indicate the number of files to be included in the zip archive. So you pack three files this new placeholder would place "3" in the filename
F4MiniMenu (Forum) - Open selected file(s) from TC in defined editor(s) - A (minimalistic) clone of F4Menu
Source at GitHub (AutoHotkey). TCSyncComments (copy file comments)
User avatar
Helix751
Senior Member
Senior Member
Posts: 228
Joined: 2004-06-16, 21:16 UTC

Re: timestamp (yyyymmdd) as prefix to the Pack archive name

Post by *Helix751 »

This would be a great addition.

i use 'zip' and '7-zip' packing a lot for project version archival and backup, and specifying a date in the file name, like in project_bak_20221028.zip would be greatly improved and more efficient specifying project_bak_[ymd].zip or the like in the packer dialogue. And perhaps even better would be having helper buttons to fill predefined fields like in Multi-Rename Tool.

This way I would have no need to recall the current date or even make mistakes writing a wrong date in the name (sh*t happens).
Regards,
Sergio

TCmd license #12059
TC11.00x86/x64 | Win11 Pro
User avatar
jinsight
Senior Member
Senior Member
Posts: 299
Joined: 2003-02-25, 19:47 UTC
Location: Wooster, Ohio, USA

Re: timestamp (yyyymmdd) as prefix to the Pack archive name

Post by *jinsight »

Workaround - after the file is created, you could use MULTIRENAME to add dates to the filename(s)
License #1945
Windows 10 Pro x64
Version 22H2 (OS Build 19045.3930)
TC 11.00 x64 and x86, Everything 1.5.0.1366a x64, QAP 11.6.3.1 x64
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6450
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: timestamp (yyyymmdd) as prefix to the Pack archive name

Post by *Horst.Epp »

jinsight wrote: 2022-10-28, 19:27 UTC Workaround - after the file is created, you could use MULTIRENAME to add dates to the filename(s)
Thats what I do :)
Button for it

Code: Select all

TOTALCMD#BAR#DATA
MULTIRENAME==AppendDateTime

%COMMANDER_PATH%\PLUGINS\SetFolderDate\SetFolderDate_1.5.ico
Add file(s) Date and Time to the name

0
-1
Entries in the [rename] section of Wincmd.ini

Code: Select all

AppendDateTime_name=[N]_[YMD]_[hm]
AppendDateTime_ext=[E]
AppendDateTime_params=0|1|1|1
Windows 11 Home x64 Version 23H2 (OS Build 22631.3374)
TC 11.03 x64 / x86
Everything 1.5.0.1371a (x64), Everything Toolbar 1.3.2, Listary Pro 6.3.0.69
QAP 11.6.3.2 x64
User avatar
Helix751
Senior Member
Senior Member
Posts: 228
Joined: 2004-06-16, 21:16 UTC

Re: timestamp (yyyymmdd) as prefix to the Pack archive name

Post by *Helix751 »

Thanks for the ideas, but speed and efficiency is a must. Additional clicking and typing isn't a much desired option.
For the time being (and waiting for this to get into TCmd, I'm using an AutoHotKey macro script -part of my 'autorun' AutoHotKey.ahk file- for this.

In my code. writing `}dd` anywhere in the name field does the job (instant replacing. Just be sure to use a simple but rare sequence of chars to avoid unwanted text replacements).
Of course there are additional macros for different date-time combinations.

Code: Select all

:T*?:}dd::
FormatTime, CurrentDateTime,, yyyyMMdd
SendInput %CurrentDateTime%
return
:T*?:}dm::
FormatTime, CurrentDateTime,, dd/MM/yy
SendInput %CurrentDateTime%
return
:T*?:}dh::
FormatTime, CurrentDateTime,, yyyyMMddHHmmss
SendInput %CurrentDateTime%
return
:T*?:}ds::
FormatTime, CurrentDateTime,, yyMMdd
SendInput %CurrentDateTime%
return
:T*?:}-dd::
FormatTime, CurrentDateTime,, dd-MM-yyyy
SendInput %CurrentDateTime%
return
:T*?:}-dh::
FormatTime, CurrentDateTime,, dd-MM-yy HH:mm
SendInput %CurrentDateTime%
return
Regards,
Sergio

TCmd license #12059
TC11.00x86/x64 | Win11 Pro
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6450
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: timestamp (yyyymmdd) as prefix to the Pack archive name

Post by *Horst.Epp »

I do such replacements with Quick Access Popup (written in Autohotkey).
But such a function doesn't automate things as you must type something to get the replacament.
Our suggestions are working with simple button click.
Windows 11 Home x64 Version 23H2 (OS Build 22631.3374)
TC 11.03 x64 / x86
Everything 1.5.0.1371a (x64), Everything Toolbar 1.3.2, Listary Pro 6.3.0.69
QAP 11.6.3.2 x64
User avatar
Sir_SiLvA
Power Member
Power Member
Posts: 3278
Joined: 2003-05-06, 11:46 UTC

Re: timestamp (yyyymmdd) as prefix to the Pack archive name

Post by *Sir_SiLvA »

BUMP! for being able to use %$DATE% directly in the packing dialog please because what is the sense of this variable if not can be used in the most asked form for? :D
(and yes if I just use %$DATE% in that combobox I expect tc to replace the : with .)
Hoecker sie sind raus!
User avatar
Gral
Power Member
Power Member
Posts: 1460
Joined: 2005-01-26, 15:12 UTC

Re: timestamp (yyyymmdd) as prefix to the Pack archive name

Post by *Gral »

Support. It is on my request list for years, maybe decades...
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: timestamp (yyyymmdd) as prefix to the Pack archive name

Post by *ghisler(Author) »

This is problematic (also in the F5 dialog) because when you open the dialog, it will suggest the target panel directory by default, and that may already contain % signs in the name.
Instead, use a button with parameters, e.g.
cm_packfiles /T="c:\path\filename%$DATE%.zip"
There is currently a bug that cm_packfiles doesn't work with the options in the parameters field, but that will be fixed in beta 5.
Author of Total Commander
https://www.ghisler.com
User avatar
Gral
Power Member
Power Member
Posts: 1460
Joined: 2005-01-26, 15:12 UTC

Re: timestamp (yyyymmdd) as prefix to the Pack archive name

Post by *Gral »

Isn't possible enclose it additionally in pipes, as in parameters field for button?
User avatar
Sir_SiLvA
Power Member
Power Member
Posts: 3278
Joined: 2003-05-06, 11:46 UTC

Re: timestamp (yyyymmdd) as prefix to the Pack archive name

Post by *Sir_SiLvA »

ghisler(Author) wrote: 2023-05-26, 08:43 UTC This is problematic (also in the F5 dialog) because when you open the dialog, it will suggest the target panel directory by default, and that may already contain % signs in the name.
Instead, use a button with parameters, e.g.
cm_packfiles /T="c:\path\filename%$DATE%.zip"
There is currently a bug that cm_packfiles doesn't work with the options in the parameters field, but that will be fixed in beta 5.
Then how about adding the same [+] button cm_MkDir and cm_EditNewFile got?
Hoecker sie sind raus!
JOUBE
Power Member
Power Member
Posts: 1448
Joined: 2004-07-08, 08:58 UTC

Re: timestamp (yyyymmdd) as prefix to the Pack archive name

Post by *JOUBE »

Horst.Epp wrote: 2022-10-28, 19:56 UTC
jinsight wrote: 2022-10-28, 19:27 UTC Workaround - after the file is created, you could use MULTIRENAME to add dates to the filename(s)
Thats what I do :)
I do the same. For me it's not a workaround, it's just ordinary work that I sometimes do and in other cases don't do.

Because I don't like to have the buttonbar and therefore don't use buttons, I do it like this: [Ctrl+M] [F2] [2] *)

*) [Ctrl+M]: MUT (Multi Rename Tool)
[F2]: Load/Save settings
[2]: The pre-configured setting in this case is accessible with keyboard key [2]

Joube
Post Reply