Page 1 of 1

timestamp (yyyymmdd) as prefix to the Pack archive name

Posted: 2010-05-21, 11:11 UTC
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

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

Posted: 2019-11-11, 21:37 UTC
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

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

Posted: 2022-10-28, 15:15 UTC
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).

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

Posted: 2022-10-28, 19:27 UTC
by jinsight
Workaround - after the file is created, you could use MULTIRENAME to add dates to the filename(s)

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

Posted: 2022-10-28, 19:56 UTC
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

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

Posted: 2022-10-30, 15:32 UTC
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

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

Posted: 2022-10-30, 15:56 UTC
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.

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

Posted: 2023-05-25, 12:29 UTC
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 .)

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

Posted: 2023-05-25, 12:37 UTC
by Gral
Support. It is on my request list for years, maybe decades...

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

Posted: 2023-05-26, 08:43 UTC
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.

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

Posted: 2023-05-26, 10:06 UTC
by Gral
Isn't possible enclose it additionally in pipes, as in parameters field for button?

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

Posted: 2023-05-26, 12:35 UTC
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?

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

Posted: 2023-05-27, 05:35 UTC
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