Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save mlabrkic/907ea9fbc7e5fff4e9b6c5c3f6264135 to your computer and use it in GitHub Desktop.
Save mlabrkic/907ea9fbc7e5fff4e9b6c5c3f6264135 to your computer and use it in GitHub Desktop.
"Multi Commander" script: Create a new folder (your input, current date and time, format), http://multicommander.com/
// MC_Create_folder_your_input_and_date_format, F12
// "Multi Commander" script: Create a new folder (your input, current date and time, format)
// 2022-02M-20 18:55:27
// http://forum.multicommander.com/forum/index.php/topic,1184.msg4072.html#msg4072
// Multi Commander Support Forum »Multi Commander »Script »create a new open folder with the current date
// Contributor: Ulfhednar
// ---------------------------------------------------------
@var $now = GetTime();
@var $folder;
@var $FolderBaseName = GetSourcePath();
// ---------------------------------------------------------
// @var $date = FormatDate( "yyyy-MM-dd" , $now );
@var $year = FormatDate( "yyyy" , $now );
@var $month = FormatDate( "MM" , $now );
@var $day = FormatDate( "dd" , $now );
@var $date = $year + "-" + $month + "M-" + $day;
// ---------------------------------------------------------
// @var $time = FormatTime( "HH-mm" , $now );
@var $hours = FormatTime( "HH" , $now );
@var $minutes = FormatTime( "mm" , $now );
@var $time = $hours + "h-" + $minutes;
// ---------------------------------------------------------
// Ask user for folder name
@var $answer = AskText("Type name of the new folder to create and move selected files.", "backup", 0);
// If user canceled, abort
if ( $answer == 0 )
{
break;
}
$folder = $FolderBaseName ^ ($answer + "_" + $date + "_" + $time);
MC.Filesystem.Makedir PATH={$folder}
// ---------------------------------------------------------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment