I have done the following for a button to extract selected archive to current dir using 7z:
command : "C:\Program Files\7-Zip\7zG.exe"
parameters : e %P%N -o%P%O
start path : %P
It works, but when used it displays a 'confirm file replace' dialogue.
Is there a better way to do the same thing ?
button to extract 7z zip to current dir
Moderators: white, Hacker, petermad, Stefan2
-
- Junior Member
- Posts: 42
- Joined: 2017-09-21, 10:35 UTC
- ghisler(Author)
- Site Admin
- Posts: 48166
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: button to extract 7z zip to current dir
According to a quick Google search, 7zg.exe accepts the following parameters to control overwrite behaviour:
-aoa Overwrite All existing files without prompt.
-aos Skip extracting of existing files.
-aou Auto rename extracting file (for example, name.txt will be renamed to name_1.txt).
-aot Quto rename existing file (for example, name.txt will be renamed to name_1.txt).
-aoa Overwrite All existing files without prompt.
-aos Skip extracting of existing files.
-aou Auto rename extracting file (for example, name.txt will be renamed to name_1.txt).
-aot Quto rename existing file (for example, name.txt will be renamed to name_1.txt).
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
-
- Junior Member
- Posts: 42
- Joined: 2017-09-21, 10:35 UTC
Re: button to extract 7z zip to current dir
Thanks for pointing me in the right direction. I found the problem, if the archive contained folders with same name files in (like /Windows8 version and /Windows7 version, etc.) my command would extract all the files in all the folders to the root folder in the excracted folder, creating a name conflict.
I found a fix, as follows :
command : "C:\Program Files\7-Zip\7zG.exe"
parameters : x %P%N -o%P%O
start path : %P
I found a fix, as follows :
command : "C:\Program Files\7-Zip\7zG.exe"
parameters : x %P%N -o%P%O
start path : %P
Re: button to extract 7z zip to current dir
Continued here: viewtopic.php?f=3&t=50849