Multi Commander > Script
Strange behavior with MoveFile
(1/1)
ECommander:
I'm using this code in a loop to move one or more files into a subfolder
--- Code: --- MoveFile($folder + "\", $file, "NODIALOG,NOPROGRESS,USEEXISTINGQUEUE" )
--- End code ---
What happens, that there is an open dialog, which never close (see screenshot).
Wher could be the problem?
Tanks
AlanJB:
What MC are you using: version and installed/portable?
There seems to be another problem in that in your screenshot, the upper progress bar says "2 of 1" ?!
ECommander:
Thanks for answering.
It's the installed version, v11.6 (b2845).
Thats the command I try to run:
--- Code: ---@var $files = GetSelectedPaths();
@var $count = arrayCount($files);
@var $n;
for($n = 0; $n < $count; $n++)
{
@var $file = $files[$n];
if (FileExists($file) == 1 )
{
@var $path = PathGetPathPart($file)
@var $name = PathGetNamePart($file) + "|";
@var $ext = PathGetFileExtPart($file);
@var $folder = $path ^ StrReplace( $name, $ext + "|" , "");
MoveFile($folder + "\", $file, "NODIALOG,NOPROGRESS,USEEXISTINGQUEUE" )
}
--- End code ---
Mathias (Author):
--- Quote from: ECommander on June 14, 2022, 18:21:37 ---Thanks for answering.
It's the installed version, v11.6 (b2845).
Thats the command I try to run:
--- Code: ---@var $files = GetSelectedPaths();
@var $count = arrayCount($files);
@var $n;
for($n = 0; $n < $count; $n++)
{
@var $file = $files[$n];
if (FileExists($file) == 1 )
{
@var $path = PathGetPathPart($file)
@var $name = PathGetNamePart($file) + "|";
@var $ext = PathGetFileExtPart($file);
@var $folder = $path ^ StrReplace( $name, $ext + "|" , "");
MoveFile($folder + "\", $file, "NODIALOG,NOPROGRESS,USEEXISTINGQUEUE" )
}
--- End code ---
--- End quote ---
Yes looks like NOPROGRESS parameter have been broken.. I will fix that for the next version
ECommander:
Thank you.
Navigation
[0] Message Index
Go to full version