Topic: 7z.exe Commands  (Read 3343 times)

7z.exe Commands
« on: January 19, 2017, 03:51:36 AM »

Prz42

  • Code Baker
  • Sr. Chef
  • ****
  • Date Registered: Jan 2014
  • Posts: 513
I want to compress a file or a group of files using 7zip.
It is would be helpful if it compressed to Ultra Mode.
Need to incorporate it into a plugin. Something like
Code: [Select]
ShellExecute,hide,"%Tools%\7z.exe",%ProvideFiles%\%SetupFile%#$q #$q%ProvideFiles%\%Web_Setup_File%#$q"
Can't seem to find the command usage 7z.exe/? or on the net.

Re: 7z.exe Commands
« Reply #1 on: January 19, 2017, 08:56:13 AM »

Lancelot

  • Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 10350
check 7-zip.chm file

> Command Line Version
 > Commands
   > a [Add]

Tip:
Reminding,
7z commandline sometimes not flexible enough for some special cases....


Advice:
 do not use Ultra Mode for big files,
 Ultra Mode (Maximum Compression) is for special cases.......

 Maximum Compression: It will take quite long time  :thumbdown: and size gain is very low = not efficient
 Default ( Normal ) compression is very efficient and get good enough compression with good speed.

Experiment yourself....

General Advice:
 Development on computer and generally on engineering is about efficiency,
 not about getting smallest size or maximum speed or .....
   Ex:
   It is not efficient to use fastest plane on public transport,
   Public Plane Developers do not work on fastest plane but other things....

Something to Keep in mind on your plugin developments  :wink:

:turtle:

Re: 7z.exe Commands
« Reply #2 on: January 19, 2017, 11:25:24 PM »

Rui Paz

  • Code Baker
  • Jr. Chef
  • **
  • Date Registered: Mar 2011
  • Posts: 47

Re: 7z.exe Commands
« Reply #3 on: January 20, 2017, 04:28:08 AM »

Prz42

  • Code Baker
  • Sr. Chef
  • ****
  • Date Registered: Jan 2014
  • Posts: 513
This is as far as I could get.  Command lines for dos prompt doesn't seem
to work the same in plugins. Or maybe I am looking at it all wrong.
Code: [Select]
ShellExecute,Hide,"%Tools%\7z.exe","a #$q%ProvideFiles%\%ZipFile%#$q #$q%ProvideFiles%\*#$q"
I couldn't get the compress value past the default.     :confused:

Re: 7z.exe Commands
« Reply #4 on: January 20, 2017, 04:16:17 PM »

Rui Paz

  • Code Baker
  • Jr. Chef
  • **
  • Date Registered: Mar 2011
  • Posts: 47
I couldn't get the compress value past the default.     :confused:

7z.exe a -mx=9 test.7z *.*

Re: 7z.exe Commands
« Reply #5 on: January 20, 2017, 09:30:23 PM »

Prz42

  • Code Baker
  • Sr. Chef
  • ****
  • Date Registered: Jan 2014
  • Posts: 513
I tried that but didn't seem to get any add compression?
I felt like I was fumbling around so thanks for your response.
I tried again with not much success, but then after trying in
the graffical mode I see that if the name is .zip will only compress
so much. So changed the file name to .7z and it compressed to
double the amount. Then renamed it to .zip and everything
works great in WinBuilder.        :scooter:
Code: [Select]
  ShellExecute,Hide,"%Tools%\7z.exe","a -mx=9 #$q%ProvideFiles%\%7zFile%#$q #$q%ProvideFiles%\*#$q"
  FileRename,%ProvideFiles%\%7zFile%,%ProvideFiles%\%ZipFile%

 

Powered by EzPortal