Multi Commander Support Forum

Multi Commander => Script => Topic started by: pncdaspropagandas on August 11, 2017, 13:34:15

Title: UnpackFile OVERWRITEALL
Post by: pncdaspropagandas on August 11, 2017, 13:34:15
Hi,

I am trying to write a script that extract all selected archives to current directory and overwrite all files.

The problem is that the option OVERWITEALL is not working for me. When I run the script, the "Would you like to replace the existing file?" window shows and I have to choose a option for each selected archive. I'm using MC 7.4 build 2377. I wonder if I am doing something wrong here.

@var $source_path = GetSourcePath();
@var $arr_selected_file_paths[] = GetSourceSelectedPaths();

@var $n;
for( $n=0; $n<arrayCount($arr_selected_file_paths); $n++ )
{
   @var $test = UnpackFile($arr_selected_file_paths[$n], $source_path, "*.*", "OVERWRITEALL, USEEXISTINGQUEUE, NOWAIT");
   LogAppInfo($test);
}

Thanks
Title: Re: UnpackFile OVERWRITEALL
Post by: Mathias (Author) on August 11, 2017, 17:28:34
I don't get that. It works for me..
Do you have permission to overwrite it ?

Title: Re: UnpackFile OVERWRITEALL
Post by: pncdaspropagandas on August 11, 2017, 18:55:53
Yes, I do.

I did another test and downloaded the stable version to see if maybe it was any customization I made that caused the problem and the result was the same.

I have these files:
langs.model.7z
langs.model.xml
uninstall.7z
uninstall.exe

- I delete langs.model.xml and uninstall.exe and select the 7z files
- Run the script (fine, no overwriting)
- Run the script again -> replace confirmation window shows up

Also tested with only uninstall.7z selected
Title: Re: UnpackFile OVERWRITEALL
Post by: Mathias (Author) on August 11, 2017, 18:58:00
Ahh 7z.. might be that. I only tested zip.. I will check again later.
Title: Re: UnpackFile OVERWRITEALL
Post by: pncdaspropagandas on August 11, 2017, 19:43:54
Indeed! Tested here and zip files overwrite as normal, but 7z don't!
Title: Re: UnpackFile OVERWRITEALL
Post by: Mathias (Author) on August 12, 2017, 14:40:25
Will fix that for next version