x2 command script to "call" 7-Zip ??

Discussion & Support for xplorer² professional

Moderators: fgagnon, nikos, Site Mods

Post Reply
Mr.Pleasant
Silver Member
Silver Member
Posts: 281
Joined: 2006 Dec 29, 12:56
Location: Utrecht, NL

x2 command script to "call" 7-Zip ??

Post by Mr.Pleasant »

in another thread, Kunkel321 wrote:And a Question:  Has anyone figured out how to do an x2 command script to "call" 7-Zip??
I mentioned something like this in a previous thread:
http://forum.zabkat.com/viewtopic.php?t=7278#44804
Go check it!
User avatar
kunkel321
Gold Member
Gold Member
Posts: 534
Joined: 2008 Jan 05, 18:58

Post by kunkel321 »

Mr.Pleasant wrote:7-zip to zip selected folder(s) to the opposite pane:
Code:  >> "[path to 7z.exe]" a -tzip "$I\$N.zip" "$N"

7-zip to unzip selected zip(s) to the opposite pane:
Code: >> "[path to 7z.exe]" x "$N" -o"$I" -r

7-zip: test selected archive(s):
Code:  $$ "[path to 7z.exe]" t "$F"
Cool thanks!  
And groovy-clever too!
Gary M. Mugford
Bronze Member
Bronze Member
Posts: 150
Joined: 2009 Oct 14, 00:54
Location: Brampton ON Canada

Post by Gary M. Mugford »

kunkel321 wrote: And a Question:  Has anyone figured out how to do an x2 command script to "call" 7-Zip??  I know that there is a command line version (7z.exe).  I thought it would be clever if I could use x2 to sellect-all (Ctrl-A) the files in SomeFolder, then click an x2 toolbar button and have the files automagically put into SomeFolder.zip...
I took a little different path to the zipping 'problem.' I use:

Code: Select all

> E:\apps\utils\7-zip\7z.exe a $?.zip $S
You get a pop-up and you end up with it in the same folder. I use it for latest versions of my apps. i.e. AwesomeAppV104.zip. Just hitting enter in the dialog gets you .zip.zip!

I also have a button to uncompress a file to a named folder:

Code: Select all

> E:\apps\utils\7-zip\7z.exe x $N -o$B
My only problem is that it's a one compressed file at a time (altough multi parters are included). I've tried to make it work with a series of different compressed files, but it won't act on the full set, just the first one. At any rate, just another option for you.

GM
Mr.Pleasant
Silver Member
Silver Member
Posts: 281
Joined: 2006 Dec 29, 12:56
Location: Utrecht, NL

Post by Mr.Pleasant »

Gary M. Mugford wrote:My only problem is that it's a one compressed file at a time
For the second one: try ">>" in your command, instead of ">". I think that should work.
Gary M. Mugford
Bronze Member
Bronze Member
Posts: 150
Joined: 2009 Oct 14, 00:54
Location: Brampton ON Canada

Post by Gary M. Mugford »

Mr.Pleasant wrote:
Gary M. Mugford wrote:My only problem is that it's a one compressed file at a time
For the second one: try ">>" in your command, instead of ">". I think that should work.
I apologize and stand corrected. In fact, you are right. The reason I was failing to get the second and third compressed files to open was the presence of a space in the file names. I kept using the same samples, the first of which had no spaces, the other two having spaces. And the result was consistent failure for other than the first. You were SO sure of your answer, I went back to it again.

Now, of course, many of the files *I* get have spaces. None of mine, I use proper case to limit words. Earlier in this thread, snakebyte recommended awxRename. That solves the problem. SelectAll, right click and choose awxRename|Strip Spaces, reselect all and then click the icon set up for the user command. All done.

By the way, in addition to adding awxRename, I also spent 10$C on MMM+ Pro and used it to tame the voluminous menus I have created through adding utilities here and there over the years. Worth the money. You can get it at: http://hace-software.com/mmm.shtml Cannot warrent it's success on anything newer than XP, but it does what it's supposed to do for that OS.
Post Reply