Multi Commander Support Forum
Multi Commander => Support and Feedback => Topic started by: John Samuel on January 19, 2023, 21:33:00
-
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
-
You can create a User Defined Command (http://multicommander.com/docs/user-defined-commands) of MultiScript type and bind it to a hotkey or insert it on QuickLaunch bar. The simple one could look like
@var $now = GetTime();
@var $date = FormatDate("dd-MM-yy" , $now);
@var $path = GetSourcePath() ^ $date;
MakeDir($path);
If you'd like to have different formats available.
@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);
}