Date & Time Variables for User Menu

We welcome any suggestions for new features or improvements in Altap Salamander. Please post one suggestion per report.
User avatar
TimeGhost
Posts: 16
Joined: 27 Jan 2006, 20:00
Location: Northeastern USA

Date & Time Variables for User Menu

Post by TimeGhost »

It would be handy if we had date and time variables in the User Menu customization.

One implementation might just be to add $[date] and $[time] that would return the current date and time formatted according to regional settings.

Another approach might be to provide a syntax for custom format date / time like this:

$(YYYYMMDD) = 20130604
$(hhmmss) = 115223

The second method is preferred since the separators in the time string tend to include colons, which cannot be used in file names.

One application is when using PDFTK to combine PDF files into one PDF. This command syntax would include a date stamp in the name of the output file:

PDFTK $(ListOfSelectedNames) cat output PDFTK_$(YYYYMMDD).pdf

I apologize in advance if there is an easy way to do this (perhaps using a batch file wrapper), or if this has been requested many times.

Thanks!

User avatar
otrov
Posts: 110
Joined: 10 Feb 2010, 04:39

Re: Date & Time Variables for User Menu

Post by otrov »

That perhaps would be handy for your current and particular problem. If AS provides too many variables it would just clutter current easy access

But, AS provides Automation plugin, which can be accessed with various scripting languages.
I find that as the right place for handling any exotic feature, such as datetime and datetime formatting.

Alternatively, as you just wrote, you can call batch (or other) script from the menu and handle it there.

2c

User avatar
mdruiter
Posts: 260
Joined: 22 Feb 2006, 15:33
Location: Amsterdam, The Netherlands
Contact:

Re: Date & Time Variables for User Menu

Post by mdruiter »

Try this:

Code: Select all

PDFTK $(ListOfSelectedNames) cat output PDFTK_%DATE:/=%.pdf
Or with time:

Code: Select all

@echo %DATE:/=-% %TIME:~0,2%;%TIME:~3,2%;%TIME:~6,2%> C:\file.txt

User avatar
TimeGhost
Posts: 16
Joined: 27 Jan 2006, 20:00
Location: Northeastern USA

Re: Date & Time Variables for User Menu

Post by TimeGhost »

Thanks! That worked very well! I didn't know I could use environment variables in the F9 command line like that. But in retrospect it makes a lot of sense.

Post Reply