
Thanks for an amazing application!
Moderators: Hacker, petermad, Stefan2, white
Alternativescyberzip wrote: 2018-08-26, 21:06 UTC ...like to have a keyboard shortcut for inserting the date ...
Code: Select all
;FormatTime, OutputVar [, YYYYMMDDHH24MISS, Format]
FormatTime, OutputVar , ,yyyy-MM-dd-HHmmss
;Execute on 'Win+N ' key press
#n::
Send %OutputVar%
Ahh, yes, you are right!HolgerK wrote: 2018-08-27, 09:02 UTC 2tuska
MRT creates a date based on the modification date of the file, not the current date!
Regards
Holger
The modification date is more useful for this purpose.
Code: Select all
1. Prepend _YYYY-MM-DD_hhmmss _
Rename Mask : [=tc.writedate.Y-M-D_hms] [N]
RegEx : N/A
Code: Select all
2. Remove _YYYY-MM-DD_hhmmss_ from start
Rename Mask : [N]
Search for : (\d{4})-(\d{2})-(\d{2})_(\d{6})( +)(.*)
RegEx : Enabled
Code: Select all
1. Launch cm_CommandBrowser
2. In Category select "usercmd.ini"
3. Create a new entry "em_prepend_date_time_to_filename"
Command: "MULTIRENAME 1. Prepend _YYYY-MM-DD_hhmmss _"
Tooltip: "Prepend Date & Time to the filename"
Code: Select all
1. Select Configuration -> Options -> Misc.
2. Select hotkey = CTRL+ALT+D
3. Click search button
4. In Category select "usercmd.ini"
5. Select the just created command "em_prepend_date_time_to_filename"
6. Click OK
7. Click the green tick mark
8. Click OK
Code: Select all
1. Select files
2. Press CTRL+ALT+D
3. Press OK
4. Press ESC
Code: Select all
1. Select files
2. CTRL+M => Launch Multi Rename Files
3. F2 => Load settings
4. 1 => Select preset "1. Prepend _YYYY-MM-DD_hhmmss _"
5. Enter => Perform the rename
6. F5 => Refresh the view to see the renamed files
Code: Select all
1. Select files
2. CTRL+M => Launch Multi Rename Files
3. F2 => Load settings
4. 2 => Select preset "2. Remove _YYYY-MM-DD_hhmmss_ from start"
5. Enter => Perform the rename
6. F5 => Refresh the view to see the renamed files
Code: Select all
%APPDATA%\Roaming\GHISLER\usercmd.ini
%APPDATA%\Roaming\GHISLER\wincmd.ini
Code: Select all
TOTALCMD#BAR#DATA
cm_RenMov
/GT="%|$DATE:Y-M-D_h.m.s|_%N"W="%N"
WCMICONS.DLL,32
Prepend name of the file under the cursor with current date and time
Requires TC 11.0 or newerTo make the button:
1. Mark the text in the box here above (click SELECT ALL).
2. Copy it to the ClipBoard (press Ctrl+C).
3. Right click on TC's buttonbar and choose "Paste".
Code: Select all
"MULTIRENAME 1. Prepend _YYYY-MM-DD_hhmmss _"
Code: Select all
"MULTIRENAME == 1. Prepend _YYYY-MM-DD_hhmmss _"
12.04.22 Release Total Commander 10.50 beta 1
28.02.22 Added: command MULTIRENAME==<settings> with two equal signs now starts renaming immediately and closes the dialog if successful (32/64)
It works fine, but you are right the W="%N" part is not necessary - it was left over from tests where I tried to make it work for several files. And of course we need %Q - I just never use spaces in file names so i forgot about it.
Just not as in the examples:I tried to make it work for several files.
Code: Select all
TOTALCMD#BAR#DATA
cm_Renmov
/GT="???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????_%|$DATE:Y-M-D_h-m-s|.*"
WCMICONS.DLL,32
Exactly - I don't think it is possible using cm_Renmov without any third party programs.Just not as in the examples:
Code: Select all
"0. Prepend _YYYY-MM-DD _"
Rename Mask : [T2][Y]-[M]-[D] [N]
RegEx : N/A
Code: Select all
"1. Prepend _YYYY-MM-DD_hhmmss _"
Rename Mask : [T2][Y]-[M]-[D]_[h][m][s] [N]
RegEx : N/A
Code: Select all
"2. Remove _YYYY-MM-DD_hhmmss_ from start"
Rename Mask : [N]
Search for : (\d{4})-(\d{2})-(\d{2})(_\d{6}){0,1}( +)(.*)
RegEx : Enabled
Code: Select all
1. Launch cm_CommandBrowser
2. In Category select "usercmd.ini"
3. Create a new entry "em_prepend_date_to_filename"
Command: "MULTIRENAME == 0. Prepend _YYYY-MM-DD _"
Tooltip: "Prepend Date to the filename"
4. Create a new entry "em_prepend_date_time_to_filename"
Command: "MULTIRENAME == 1. Prepend _YYYY-MM-DD_hhmmss _"
Tooltip: "Prepend Date & Time to the filename"
Code: Select all
1. Select Configuration -> Options -> Misc.
2. Select hotkey = CTRL+ALT+D
3. Click search button
4. In Category select "usercmd.ini"
5. Select the just created command "em_prepend_date_to_filename"
6. Click OK
7. Click the green tick mark
8. Click OK
9. Select hotkey = CTRL+ALT+SHIFT+D
10. Click search button
11. In Category select "usercmd.ini"
12. Select the just created command "em_prepend_date_time_to_filename"
13. Click OK
14. Click the green tick mark
15. Click OK
Code: Select all
[Shortcuts]
CAS+D=em_prepend_date_time_to_filename
CA+D=em_prepend_date_to_filename
Code: Select all
1. Select files
2a. Press CTRL+ALT+D (for date)
2b. Press CTRL+ALT+SHIFT+D (for date+time)
Code: Select all
1. Select files
2. CTRL+M => Launch Multi Rename Files
3. F2 => Load settings
4. 0 => Select preset "0. Prepend _YYYY-MM-DD _"
5. Enter => Perform the rename
6. F5 => Refresh the view to see the renamed files
Code: Select all
1. Select files
2. CTRL+M => Launch Multi Rename Files
3. F2 => Load settings
4. 1 => Select preset "1. Prepend _YYYY-MM-DD_hhmmss _"
5. Enter => Perform the rename
6. F5 => Refresh the view to see the renamed files
Code: Select all
1. Select files
2. CTRL+M => Launch Multi Rename Files
3. F2 => Load settings
4. 2 => Select preset "2. Remove _YYYY-MM-DD_hhmmss_ from start"
5. Enter => Perform the rename
6. F5 => Refresh the view to see the renamed files
Code: Select all
%APPDATA%\Roaming\GHISLER\usercmd.ini
%APPDATA%\Roaming\GHISLER\wincmd.ini
Code: Select all
[=tc.writedate.Y-M-D_hms] [N]
Code: Select all
[T2][Y]-[M]-[D]_[h][m][s] [N]