Page 3 of 4

Re: Extract all and right click menu

Posted: 03 May 2021 19:37
by Horst
1024mb wrote: 03 May 2021 19:27
admin wrote: 01 May 2021 19:08 PS: next beta lets you right-drag your RARs onto a folder:

Code: Select all

    + Drag and Drop Context Menu: Now "Extract Here" also supports RAR files 
      (WinRAR has to be installed), and it will extract all dragged files (not 
      only the focused one). Note that you can extract ZIP and RAR files in one 
      go, and they can be from different locations.
Is there a technical reason why it needs WinRAR instead of 7-zip?
WinRAR can also create rar archives so its more universal.
But you can for example use a script for 7zip.
This extracts 7z, rar and zip archives into the other pane.

Code: Select all

// Extracts the selected archive(s) to the inactive pane using 7-Zip.

// Check if there's at least one (archive) file selected

   $selected    = <get SelectedItemsPathNamesSlashed>;
   $cntSelected = gettoken($selected, "count", <crlf>);
   end ($cntSelected == 0), "No (archive) file(s) selected, aborted!";

   $cntFiles = gettoken(formatlist($selected, "f", <crlf>, "!*\"), "count", <crlf>);
   end ($cntSelected != $cntFiles), "Folder(s) can't be selected, aborted!";

   focus "PI";

   foreach($item, $selected, <crlf>, "e") {
        if (exists($item) == 2) { continue; }

    Run("""C:\Program Files\7-Zip\7zG.exe"" x ""$item"" -o""<curpath>""");
    };

    Focus "PI";

Re: Extract all and right click menu

Posted: 03 May 2021 20:02
by admin
1024mb wrote: 03 May 2021 19:27
admin wrote: 01 May 2021 19:08 PS: next beta lets you right-drag your RARs onto a folder:

Code: Select all

    + Drag and Drop Context Menu: Now "Extract Here" also supports RAR files 
      (WinRAR has to be installed), and it will extract all dragged files (not 
      only the focused one). Note that you can extract ZIP and RAR files in one 
      go, and they can be from different locations.
Is there a technical reason why it needs WinRAR instead of 7-zip?
Good point. I made some tests and 7-zip seems to work well via command line with RAR, 7z, GZ, TAR. (Did not test any others)
Will add, so you don't need WinRAR when you have 7-zip.

Re: Extract all and right click menu

Posted: 03 May 2021 22:10
by nas8e9
admin wrote: 03 May 2021 20:02
1024mb wrote: 03 May 2021 19:27
admin wrote: 01 May 2021 19:08 PS: next beta lets you right-drag your RARs onto a folder:

Code: Select all

    + Drag and Drop Context Menu: Now "Extract Here" also supports RAR files 
      (WinRAR has to be installed), and it will extract all dragged files (not 
      only the focused one). Note that you can extract ZIP and RAR files in one 
      go, and they can be from different locations.
Is there a technical reason why it needs WinRAR instead of 7-zip?
Good point. I made some tests and 7-zip seems to work well via command line with RAR, 7z, GZ, TAR. (Did not test any others)
Will add, so you don't need WinRAR when you have 7-zip.
@Don: I'm having problems getting this to work with 20.70.0109 and 7-Zip 19.00 x64: instead of extracting the selected files, 7-Zip gets opened in the source folder?

Re: Extract all and right click menu

Posted: 04 May 2021 10:19
by admin
I installed 7-Zip 19.00 x64 but could not note any problems. :? I'll add some debug stuff to the next beta...

Re: Extract all and right click menu

Posted: 04 May 2021 10:27
by Horst
admin wrote: 04 May 2021 10:19 I installed 7-Zip 19.00 x64 but could not note any problems. :? I'll add some debug stuff to the next beta...
It would be helpful to get an option what tool to use if 7zip and WinRAR are both installed.

Re: Extract all and right click menu

Posted: 04 May 2021 10:57
by admin
Yep, had the same idea.

Re: Extract all and right click menu

Posted: 04 May 2021 13:24
by Horst
admin wrote: 04 May 2021 10:57 Yep, had the same idea.
Works fine now with both options for me.

Re: Extract all and right click menu

Posted: 04 May 2021 15:56
by nas8e9
With a fresh instance of 20.70.0112 and only 7-Zip installed in a VM (not WinRAR), I continue to get the same problem: when extracting a .rar-file, 7zFM.exe gets opened in the source folder without any extracting taking place?

Re: Extract all and right click menu

Posted: 04 May 2021 16:05
by admin
Cannot explain. I just call 7z.exe, not 7zFM.exe.

Re: Extract all and right click menu

Posted: 04 May 2021 16:37
by nas8e9
admin wrote: 04 May 2021 16:05 Cannot explain. I just call 7z.exe, not 7zFM.exe.
Does the output of the r7-command differ from yours:
C:\Program Files\7-Zip\7zFM.exe
.7z.ace.arj.bz2.cab.gz.iso.jar.lzh.rar.tar.uue.xz.z.

%ProgramW6432%\7-Zip\7z.exe
C:\Program Files\7-Zip\7z.exe

Re: Extract all and right click menu

Posted: 04 May 2021 16:47
by admin
Uh, yes. Yours is rubbish. :) But it's my fault. :ninja: Apparently you associated 7zFM.exe to RAR files which is your good right. I have to think about this... it should look like this in the end:

Code: Select all

%ProgramFiles(x86)%\WinRAR\UnRAR.exe
C:\Program Files (x86)\WinRAR\UnRAR.exe
C:\Program Files (x86)\WinRAR\WinRAR.exe
.7z.ace.arj.bz2.cab.gz.iso.jar.lzh.rar.tar.uue.xz.z.

%ProgramW6432%\7-Zip\7z.exe
C:\Program Files\7-Zip\7z.exe

Re: Extract all and right click menu

Posted: 04 May 2021 16:50
by highend
Some kind of caption for these r7 lines would be nice (which line derives from what setting in the .ini file)...

Re: Extract all and right click menu

Posted: 04 May 2021 16:54
by nas8e9
admin wrote: 04 May 2021 16:47 Uh, yes. Yours is rubbish. :) But it's my fault. :ninja: Apparently you associated 7zFM.exe to RAR files which is your good right. I have to think about this... it should look like this in the end:

Code: Select all

%ProgramFiles(x86)%\WinRAR\UnRAR.exe
C:\Program Files (x86)\WinRAR\UnRAR.exe
C:\Program Files (x86)\WinRAR\WinRAR.exe
.7z.ace.arj.bz2.cab.gz.iso.jar.lzh.rar.tar.uue.xz.z.

%ProgramW6432%\7-Zip\7z.exe
C:\Program Files\7-Zip\7z.exe
:oops: :). In my defence, when using 7-Zip to associate file types through Tools > Options > System, 7zFM.exe is what you get.

Re: Extract all and right click menu

Posted: 04 May 2021 16:59
by admin
highend wrote: 04 May 2021 16:50 Some kind of caption for these r7 lines would be nice (which line derives from what setting in the .ini file)...
It's just a semi-feature...

Re: Extract all and right click menu

Posted: 04 May 2021 17:10
by nas8e9
21.70.0113 works for me now.