Extract all and right click menu

Things you’d like to miss in the future...
Horst
Posts: 158
Joined: 24 Jan 2021 12:27
Location: Germany

Re: Extract all and right click menu

Post 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";
Windows 10 Home x64 Version 20H2 (OS Build 19042.985)
Portable XYplorer 21.80.0003
Everything 1.5.0.1259a (x64)

admin
Site Admin
Posts: 51145
Joined: 22 May 2004 16:48
Location: Cologne, Win 8.1, Win 10
Contact:

Re: Extract all and right click menu

Post 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.
FAQ | XY News RSS | XY Twitter | Stay home! 🎸 Or wear a mask! 😷

nas8e9
Posts: 2228
Joined: 21 Jun 2008 14:50

Re: Extract all and right click menu

Post 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?

admin
Site Admin
Posts: 51145
Joined: 22 May 2004 16:48
Location: Cologne, Win 8.1, Win 10
Contact:

Re: Extract all and right click menu

Post 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...
FAQ | XY News RSS | XY Twitter | Stay home! 🎸 Or wear a mask! 😷

Horst
Posts: 158
Joined: 24 Jan 2021 12:27
Location: Germany

Re: Extract all and right click menu

Post 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.
Windows 10 Home x64 Version 20H2 (OS Build 19042.985)
Portable XYplorer 21.80.0003
Everything 1.5.0.1259a (x64)

admin
Site Admin
Posts: 51145
Joined: 22 May 2004 16:48
Location: Cologne, Win 8.1, Win 10
Contact:

Re: Extract all and right click menu

Post by admin »

Yep, had the same idea.
FAQ | XY News RSS | XY Twitter | Stay home! 🎸 Or wear a mask! 😷

Horst
Posts: 158
Joined: 24 Jan 2021 12:27
Location: Germany

Re: Extract all and right click menu

Post by Horst »

admin wrote: 04 May 2021 10:57 Yep, had the same idea.
Works fine now with both options for me.
Windows 10 Home x64 Version 20H2 (OS Build 19042.985)
Portable XYplorer 21.80.0003
Everything 1.5.0.1259a (x64)

nas8e9
Posts: 2228
Joined: 21 Jun 2008 14:50

Re: Extract all and right click menu

Post 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?

admin
Site Admin
Posts: 51145
Joined: 22 May 2004 16:48
Location: Cologne, Win 8.1, Win 10
Contact:

Re: Extract all and right click menu

Post by admin »

Cannot explain. I just call 7z.exe, not 7zFM.exe.
FAQ | XY News RSS | XY Twitter | Stay home! 🎸 Or wear a mask! 😷

nas8e9
Posts: 2228
Joined: 21 Jun 2008 14:50

Re: Extract all and right click menu

Post 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

admin
Site Admin
Posts: 51145
Joined: 22 May 2004 16:48
Location: Cologne, Win 8.1, Win 10
Contact:

Re: Extract all and right click menu

Post 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
FAQ | XY News RSS | XY Twitter | Stay home! 🎸 Or wear a mask! 😷

highend
Posts: 10221
Joined: 06 Feb 2011 00:33

Re: Extract all and right click menu

Post by highend »

Some kind of caption for these r7 lines would be nice (which line derives from what setting in the .ini file)...
One of my scripts helped you out? Please donate via Paypal or paypal_donate (at) stdmail (dot) de

nas8e9
Posts: 2228
Joined: 21 Jun 2008 14:50

Re: Extract all and right click menu

Post 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.

admin
Site Admin
Posts: 51145
Joined: 22 May 2004 16:48
Location: Cologne, Win 8.1, Win 10
Contact:

Re: Extract all and right click menu

Post 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...
FAQ | XY News RSS | XY Twitter | Stay home! 🎸 Or wear a mask! 😷

nas8e9
Posts: 2228
Joined: 21 Jun 2008 14:50

Re: Extract all and right click menu

Post by nas8e9 »

21.70.0113 works for me now.

Post Reply