Author Topic: create a new open folder with the current date  (Read 5993 times)

chiefgra

  • Newbie
  • *
  • Posts: 2
    • View Profile
create a new open folder with the current date
« on: May 12, 2014, 12:20:46 »
how to create a new open folder with the current date in the active panel?

Mathias (Author)

  • Administrator
  • Elite Member
  • *****
  • Posts: 3585
    • View Profile
    • Multi Commander
Re: create a new open folder with the current date
« Reply #1 on: May 12, 2014, 18:14:54 »
Create a UserDefinedCommand of MultiScript type

And get the current time with gettime();  ( http://multicommander.com/docs/multiscript/functions/datetime#gettime )

Then format the time to what every format you want the datetime with formatdate ( http://multicommander.com/docs/multiscript/functions/datetime#formatdate )

Get the current source path as a base of the path where you add the datetime string to with GetSourcePath() ( http://multicommander.com/docs/multiscript/functions/getfilefromview#getsourcepath )

See this post for hints.
http://forum.multicommander.com/forum/index.php/topic,712.0.html

chiefgra

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: create a new open folder with the current date
« Reply #2 on: May 13, 2014, 13:16:06 »
Create a UserDefinedCommand of Batch Script(.BAT) type

cmd /c md "%date:~0,2%.%date:~3,2%.%date:~6,4%-%time:~0,2%.%time:~3,2%.%time:~6,2%"


as go directly-open a folder?:-\

Ulfhednar

  • Contributor
  • Elite Member
  • *****
  • Posts: 443
    • View Profile
Re: create a new open folder with the current date
« Reply #3 on: May 31, 2014, 18:51:25 »
Decided to try making a script for this.

config/user defined commands -> new - insert name & decription; 
command type dropdown select - multiscript -

Code: [Select]
@var $now = GetTime();
@var $date = FormatDate( "dd-MM-yyyy" , $now );
@var $folder;
@var $FolderBaseName = GetSourcePath();
{
 $folder = $FolderBaseName ^ $date;
 MC.Filesystem.Makedir PATH="{$folder}"
 }

--gives a folder with current date in selected pane/path.

See also http://forum.multicommander.com/forum/index.php/topic,1197.msg4124.html#msg4124
« Last Edit: June 01, 2014, 22:59:41 by Ulfhednar »