Add to Zip : Add Timestamp to filename

Features wanted...
Post Reply
Marc
Posts: 44
Joined: 04 Jun 2023 17:41
Location: FR - Windows x64, 10 & 11 all DPI 100%

Add to Zip : Add Timestamp to filename

Post by Marc »

Hi,

I often use the internal function (context menu) Add to Zip with the default name (which is that of the last file selected).
It's quick and easy. :appl:
As I sometimes make several zips in the same day (e.g. source codes at different times), would it be possible to add to the 3 menu options another with a TimeStamp :?: (in ISO format)
Ex: <filename>_YYYYMMDD
and possibly minutes
<filename>_YYYYMMDD_HHMM
Thanks
;)
(English in not my native language (french), I use an online translator)

highend
Posts: 14924
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Add to Zip : Add Timestamp to filename

Post by highend »

If you do it so frequently, why don't you just use a script and use it with a keyboard shortcut?

Code: Select all

end (!<curitem>), "No item selected, aborted!";
    $base = gpc(<curitem>, "base");
    $path = gpc(<curitem>, "path");
    $date = formatdate(now(), "YYYYMMDD_HHNN");
    $zip  = $path . "\" . $base . "_" . $date . ".zip";
    zip_add($zip, <curitem>);
One of my scripts helped you out? Please donate via Paypal

Marc
Posts: 44
Joined: 04 Jun 2023 17:41
Location: FR - Windows x64, 10 & 11 all DPI 100%

Re: Add to Zip : Add Timestamp to filename

Post by Marc »

Yes, thank you, that's a good idea. :beer:

I had thought that since it's a feature that's used quite a lot (suffixing archives with the creation date), it might interest some people and therefore maybe become a native feature? :party:
Simply add 2 lines to the context menu.
Add to Zip.jpg
In the meantime, I'm reading the “Droppable User Buttons (DUB)” chapter in the (excellent) Help, so I can also add a WinRar button and drop several files into it.
;)
You do not have the required permissions to view the files attached to this post.
(English in not my native language (french), I use an online translator)

Post Reply