Bug with 7z extraction button

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
darren1234
Junior Member
Junior Member
Posts: 42
Joined: 2017-09-21, 10:35 UTC

Bug with 7z extraction button

Post by *darren1234 »

I am using the following on a button to extract an archive to same directory :

Command : "C:\Program Files\7-Zip\7zG.exe"
Params : x %P%N -o%P%O
Start Path : %P


When used with an archive with no spaces in the archive name it works as intended, but when used with an archive that does have a space in the name it does not do anything.

Any help appreciated.
User avatar
Dalai
Power Member
Power Member
Posts: 9388
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: Bug with 7z extraction button

Post by *Dalai »

Add a question mark in front of the parameters to see the full parameters before confirming them. Check them carefully. My guess is that it should be

Code: Select all

x %P%N -o"%P%O"
in the parameters field. Note that %P%N (in this order!) is automatically quoted by TC.

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
darren1234
Junior Member
Junior Member
Posts: 42
Joined: 2017-09-21, 10:35 UTC

Re: Bug with 7z extraction button

Post by *darren1234 »

Many thanks that fixed it - why is the %P%O not likewise automatically quoted ? (bug maybe ?)
User avatar
Stefan2
Power Member
Power Member
Posts: 4155
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Re: Bug with 7z extraction button

Post by *Stefan2 »

darren1234 wrote: 2018-08-25, 06:39 UTC why is the %P%O not likewise automatically quoted ? (bug maybe ?)

You mean I would use smtg like '%P%O.txt' and I would get ' "%P%O".txt ' as result?


Like

C:\Temp\Install.exe
%P%O.txt >> automatically quoted >> "%P%O".txt
"C:\Temp\install".txt

?
 
User avatar
tuska
Power Member
Power Member
Posts: 3760
Joined: 2007-05-21, 12:17 UTC

Re: Bug with 7z extraction button

Post by *tuska »

2darren1234
It is also possible to extract files without a button in the current directory:

If you want to extract files from an archive with ALT+F6 (or ALT+F9) in TC, then simply overwrite the suggested path with a "." point.
Files from a .zip archive are extracted then into the current directory.

Actually, you could have continued right here: viewtopic.php?f=3&t=50792
Post Reply