126
Support and Feedback / Re: User Defined Command to go into sub-directory.
« on: August 22, 2023, 19:58:45 »
There are two way depending on how good error handling you want..
1.
You can in the command line field type "cd temp\myfolder" and it will take you to "<currentpath>\temp\myfolder"
But instead of typing that in the commandline field you can automate that with a "Custom Commands" type Command..
However if path "mtemp\yfolder" does not exists, but temp\ exists, it will go into temp\ anyway.. there is no check if path exists.
2. User defined command of "MultiScript" type
1.
You can in the command line field type "cd temp\myfolder" and it will take you to "<currentpath>\temp\myfolder"
But instead of typing that in the commandline field you can automate that with a "Custom Commands" type Command..
Code: [Select]
MC.CmdLineRun CMD="cd Temp\myfolder"
However if path "mtemp\yfolder" does not exists, but temp\ exists, it will go into temp\ anyway.. there is no check if path exists.
2. User defined command of "MultiScript" type
Code: [Select]
@var $currentPath = GetSourcePath();
@var $newPath = $currentPath ^ "Temp\\MyFolder1"
if( FileExists($newPath) == 2 )
{
MC.Explorer.Goto PATH="{$newPath}" SOURCE
}
It will only go to the path if the path exists, else it does nothing.