Skip to content

Instantly share code, notes, and snippets.

@mlabrkic
Last active April 11, 2022 08:21
Show Gist options
  • Save mlabrkic/1b5b7c76c298a3af9ac00c40a4fe6e05 to your computer and use it in GitHub Desktop.
Save mlabrkic/1b5b7c76c298a3af9ac00c40a4fe6e05 to your computer and use it in GitHub Desktop.
"Multi Commander" script: Create a new folder (your input, current date and time), http://multicommander.com/
// MC_Create_folder_your_input_and_date, F12
// "Multi Commander" script:
// Create a new folder (your input, current date and time)
// 2022-02M-20 18:07:48
// 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
// ---------------------------------------------------------
// Decided to try making a script for this.
// config/user defined commands -> new - insert name & decription;
// command type dropdown select - multiscript -
// See also
// http://forum.multicommander.com/forum/index.php/topic,1197.msg4124.html#msg4124
// ---------------------------------------------------------
// http://multicommander.com/docs/multiscript/functions/datetime
// http://forum.multicommander.com/forum/index.php/topic,4094.0.html
// ---------------------------------------------------------
@var $now = GetTime();
@var $date = FormatDate( "yyyy-MMm-dd" , $now );
@var $time = FormatTime( "HH-mm" , $now );
@var $folder;
@var $FolderBaseName = GetSourcePath();
// ---------------------------------------------------------
// 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