Multi Commander > Support and Feedback
Command to Move File
(1/1)
macmore:
How do I create a user defined command that moves the selected file to a particular directory?
Mathias (Author):
You need to use UserDefinedCommand of MultiScript type for that.
And then use the MoveFile script command
macmore:
I tried this with and without quotes around the target path, but nothing happens.
MoveFile(c:\backup, ${focusfilepath});
MoveFile("c:\backup", ${focusfilepath});
Mathias (Author):
That is because Multi-Script does not support the MultiTags for getting selected files and stuiff, MultiTags are only used for simple script.
MultiScript are powerful but more advanced and works more like real scripts. And you need to check the documentation.
Here are functions to use to get selected files and stuff.
Something like this (not sure it is correct.. But if you run it via the MultiScript Debugger (under help menu) and you can tweak it )
--- Code: ---@var $sourceFile = GetSourceFocusPath();
@var $targetPath = "C:\\Backup\\";
MoveFile( $targetPath, $sourceFile);
--- End code ---
Navigation
[0] Message Index
Go to full version