Author Topic: Strange behavior with MoveFile  (Read 17945 times)

ECommander

  • Newbie
  • *
  • Posts: 4
    • View Profile
Strange behavior with MoveFile
« on: June 13, 2022, 16:37:39 »
I'm using this code in a loop to move one or more files into a subfolder
Code: [Select]
  MoveFile($folder + "\", $file,  "NODIALOG,NOPROGRESS,USEEXISTINGQUEUE" )
What happens, that there is an open dialog, which never close (see screenshot).
Wher could be the problem?

Tanks

AlanJB

  • VIP Member
  • *****
  • Posts: 436
  • VERY old Programmer
    • View Profile
Re: Strange behavior with MoveFile
« Reply #1 on: June 13, 2022, 18:11:59 »
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

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Strange behavior with MoveFile
« Reply #2 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: [Select]
@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" )
}

Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 4455
    • View Profile
    • Multi Commander
Re: Strange behavior with MoveFile
« Reply #3 on: June 15, 2022, 10:14:51 »
Thanks for answering.
It's the installed version, v11.6 (b2845).

Thats the command I try to run:
Code: [Select]
@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" )
}

Yes looks like NOPROGRESS parameter have been broken.. I will fix that for the next version

ECommander

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Strange behavior with MoveFile
« Reply #4 on: June 21, 2022, 19:24:18 »
Thank you.