Request to add a variable with date and time in Total Commander 11
Moderators: Hacker, petermad, Stefan2, white
Request to add a variable with date and time in Total Commander 11
Hi
Request to add a variable with date and time in Total Commander 11
ex. YYYYMMDDhhmmss
Request to add a variable with date and time in Total Commander 11
ex. YYYYMMDDhhmmss
Re: Request to add a variable with date and time in Total Commander 11
2PiotrMPPL
Where would you use that? And how?
There is already
a) For Shift+F4 and F7 there are this templates: <[YMD] <[hms] behind the button on the right.
b) The WDX content plugin "filesys" (filesys sample plugin v2.5 from 31.Jan.2019)
adds new fields "Today" and "Yesterday" give back a Boolean "Yes" or "No"
[=filesys.Today]
[=filesys.Yesterday]
This works fine for Search for files created "Today" and "Yesterday",
and so for "Color by filetype" files created "Today" and "Yesterday" too.
c) For MRT, to add the current date&time, we can use [T3]:
[N]-backup created at [T3] [YMD] - [hms]
d) Left over the TC command line and the button parameter box.
03.05.23 Release Total Commander 11.00 beta 1
26.04.23 Added: Command line parameters (button bar, start menu): New parameter %|envvar|
inserts environment variable envvar, e.g. %|windir| or %|$DESKTOP| in the parameter field (32/64)
So I have something to play around this weekend ;.)
and to test if %|date| and %|time| or %|myOwnTimestamp| will work.
Could be need/neat for a simple command line usage w/o the need for external batch/script:
7z.exe -x "%P" -o "backup of %N - %|myOwnTimestamp|.7z"
Re: Request to add a variable with date and time in Total Commander 11
Why can't you add the TC timestamp yyyymmddhhmmss and not use the script?
Re: Request to add a variable with date and time in Total Commander 11
Can you name an example (or multiple) of where in TC such variable is missing? As Stefan2 already pointed out that the MRT, Shift+F4 and F7 dialogs can use such variables.
Regards
Dalai
Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Re: Request to add a variable with date and time in Total Commander 11
But not for the button
Re: Request to add a variable with date and time in Total Commander 11
It would be much easier if you said what you mean in a more complete way.
Anyway, puzzling together the little pieces of information given, I guess what you want is another pre-defined placeholder [YMDhms] that combines the already existing seperate placeholders [YMD] and [hms]. If that's true, I can say that once you used the existing [YMD][hms] that string will be in the history of the specific dialog (MRT, Shift+F4 and F7 all save their history independently). OTOH I think that it could be beneficial to have another combined placeholder. Still it would be required to know WHERE you miss this placeholder.
Regards
Dalai
Anyway, puzzling together the little pieces of information given, I guess what you want is another pre-defined placeholder [YMDhms] that combines the already existing seperate placeholders [YMD] and [hms]. If that's true, I can say that once you used the existing [YMD][hms] that string will be in the history of the specific dialog (MRT, Shift+F4 and F7 all save their history independently). OTOH I think that it could be beneficial to have another combined placeholder. Still it would be required to know WHERE you miss this placeholder.
Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Re: Request to add a variable with date and time in Total Commander 11
As I am guessing it's to be used as a parameter in buttons, user commands and start menu similar to system %DATE% %TIME% variables.
I can even guess further - e.g. to create archive names from the command line with the current date.
I can even guess further - e.g. to create archive names from the command line with the current date.
Re: Request to add a variable with date and time in Total Commander 11
Example for the use of a button.
- Multi-Rename Tool... Ctrl+M
- Rename mask: file name: [YMDhms]_[N]
- Save settings: YYYYMMDDhhmmss
Button with command ... "MULTIRENAME==YYYYMMDDhhmmss" | test.txt --> 20230512191432_test.txt
Help - F1: Search for -> MULTIRENAME -> double-click on: Dialog box: Configuration: Change button bar > Command ... 12.Code: Select all
TOTALCMD#BAR#DATA MULTIRENAME==YYYYMMDDhhmmss wciconex.dll,5 MULTIRENAME==YYYYMMDDhhmmss|Multi-Rename Tool... Ctrl+M || Rename mask: file name: [YMDhms]_[N]|https://www.ghisler.ch/board/viewtopic.php?t=78993|Renaming starts immediately and the multi-rename tool will close if there were no errors.|Undo is possible. -1
Create a Button in the Buttonbar (copy/paste CODE)
- Click on "SELECT ALL" (to the right of CODE:), then press CTRL+C (copy to clipboard).
- Right-click on any place in the button bar, then click on "Paste".
⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺ - Option1: Point to the new button (slightly longer): 'Tooltip' is shown (-> description to the button).
A maximum of 259 characters is allowed for the tooltip. | = create line break, || = create | as separator character. - Option2: Button bar - "Tooltip" field: A single space deactivates the display of the tooltip.
If the "Tooltip" field is empty, the content of the "Command" field is displayed. - Option3: See FAQs and explanation: Button-code (TOTALCMD#BAR#DATA) <-- <Ctrl+click on the link...>
Re: Request to add a variable with date and time in Total Commander 11
What do you mean by scripts? Parameters to %ComSpec% or nircmd are scripts in your opinion?
Of course, they won't work. Don't waste your time. When requesting such syntax, I meant only EnVars.
I don't even doubt that it's about that. Only there are no such system environment variables, these variables relate exclusively to cmd.exe.
And the most basic problem will be the naming of such parameters. %Y, %y, %M, %D, %d, %S, %s are occupied. Only %h and %m remain. But it would be possible to double the letters: %YY, %MM, %DD, etc.
Including. WinRAR, by the way, has a built-in parameter.
Overquoting is evil! 👎
Re: Request to add a variable with date and time in Total Commander 11
My proposal %K ("Kurrent time?") YYYYMMDDHH24MISS with substring fields and additional options
Date/time as new Parameters for Button bar, user cmd
https://www.ghisler.ch/board/viewtopic.php?t=75669
Date/time as new Parameters for Button bar, user cmd
https://www.ghisler.ch/board/viewtopic.php?t=75669
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)
Source at GitHub (AutoHotkey). TCSyncComments (copy file comments)
Re: Request to add a variable with date and time in Total Commander 11
Support this.
With the adjustable/flexible syntax (e.g., if I steal the %K from the above u/hi5 post):
%K "{yyyyMMddTHHmm}"
%K "{yyyyMMddTHHmmssfff}"
%K "{yyyy-MM-dd HH:mm:ss.ffff}"
With the adjustable/flexible syntax (e.g., if I steal the %K from the above u/hi5 post):
%K "{yyyyMMddTHHmm}"
%K "{yyyyMMddTHHmmssfff}"
%K "{yyyy-MM-dd HH:mm:ss.ffff}"
Code: Select all
# Get-Date (formats)
# https://learn.microsoft.com/en-ca/powershell/module/Microsoft.PowerShell.Utility/Get-Date
# yyyyMMddTHHmmssffff
# yyyy 4-digit year
# MM 2-digit month
# dd 2-digit day
# T letter T as a [common] time separator [if needed]
# HH 2-digit hour
# mm 2-digit minute
# ss 2-digit second
# ffff 4-digit millisecond (f, ff, fff for 1/10, 1/100, and millisecond respectively, etc.)
#278521 User License
Total Commander [always the latest version, including betas] x86/x64 on Win10 x64/Android 10
Total Commander [always the latest version, including betas] x86/x64 on Win10 x64/Android 10
- ghisler(Author)
- Site Admin
- Posts: 49232
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: Request to add a variable with date and time in Total Commander 11
I have chosen a different approach: In beta 3, have added a new pseudo environment variable %$DATE% which inserts the current date in the form YYYYMMDDhhmmss. It also supports the same placeholders as the multi-rename tool, e.g.
%$DATE:YMDhms% and also the 12 hour format variations H and i, and 2 digit years y.
In addition to that, it allows any separators like dots or dashes. In the parameters field you can use e.g.
?%|$DATE:Y-M-D h.m.s|
It also supports partial strings like other environment variables with the ~ syntax.
%$DATE:YMDhms% and also the 12 hour format variations H and i, and 2 digit years y.
In addition to that, it allows any separators like dots or dashes. In the parameters field you can use e.g.
?%|$DATE:Y-M-D h.m.s|
It also supports partial strings like other environment variables with the ~ syntax.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: Request to add a variable with date and time in Total Commander 11
2ghisler(Author) that's entirely meets expectations. Thank you very much!
#278521 User License
Total Commander [always the latest version, including betas] x86/x64 on Win10 x64/Android 10
Total Commander [always the latest version, including betas] x86/x64 on Win10 x64/Android 10
Re: Request to add a variable with date and time in Total Commander 11
Thanks!
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)
Source at GitHub (AutoHotkey). TCSyncComments (copy file comments)
Re: Request to add a variable with date and time in Total Commander 11
Looks good in TC11.00b3.
It would look even better if %$DATE% could be used in the pack files dialog to add the current date to the zip filename... (suggestion)
It would look even better if %$DATE% could be used in the pack files dialog to add the current date to the zip filename... (suggestion)