Multi Commander > Support and Feedback
Custom date format for F9 shortcut
(1/1)
John Samuel:
Hi,
I need to change the date format for creating new folder with F7->F9 shortcuts, from YYYY-MM-DD to DD-MM-YY.
In help manual it's written as "F9 - Insert todays date as YYYY-MM-DD in the folder name field"
Thanks
John Samuel
Jungle:
You can create a User Defined Command of MultiScript type and bind it to a hotkey or insert it on QuickLaunch bar. The simple one could look like
--- Code: ---@var $now = GetTime();
@var $date = FormatDate("dd-MM-yy" , $now);
@var $path = GetSourcePath() ^ $date;
MakeDir($path);
--- End code ---
If you'd like to have different formats available.
--- Code: ---@var $now = GetTime();
@var $options[];
arrayAdd( $options, FormatDate("dd-MM-yy" , $now) );
arrayAdd( $options, FormatDate("dd-MM-yyyy" , $now) );
arrayAdd( $options, FormatDate("yyyy_MM_dd" , $now) );
arrayAdd( $options, FormatDate("ddd MMM yyyy" , $now) );
@var $o = AskOption( "Make new dir: select date format", $options, 0 );
if( $o > -1 )
{
@var $path = GetSourcePath() ^ $options[$o];
MakeDir($path);
}
--- End code ---
Navigation
[0] Message Index
Go to full version