Why is it not working? ZIP=C:\Program Files\WinRAR\WinRAR.exe

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
PiotrMP6
Junior Member
Junior Member
Posts: 10
Joined: 2021-06-18, 05:49 UTC

Why is it not working? ZIP=C:\Program Files\WinRAR\WinRAR.exe

Post by *PiotrMP6 »

Hi


Why is it not working?

ZIP=C:\Program Files\WinRAR\WinRAR.exe

or

ZIP=C:\Program Files\WinRAR\WinRAR.exe -afzip

Please help me
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6450
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: Why is it not working? ZIP=C:\Program Files\WinRAR\WinRAR.exe

Post by *Horst.Epp »

Its not possible to my knowledge to make WinRAR the default for zip.
Using WinRAR as Zip packer can be configured using a button like the following

Code: Select all

TOTALCMD#BAR#DATA
"C:\Program Files\WinRAR\WinRAR.exe"
a %T\Selected.zip @%UL
C:\Program Files\WinRAR\WinRAR.exe
WinRAR


-1
The parameter @%UL is for the selected files to process.
Add the WinRAR switches you may want before the %T
Last edited by Horst.Epp on 2021-07-19, 08:55 UTC, edited 2 times in total.
Windows 11 Home x64 Version 23H2 (OS Build 22631.3374)
TC 11.03 x64 / x86
Everything 1.5.0.1371a (x64), Everything Toolbar 1.3.2, Listary Pro 6.3.0.69
QAP 11.6.3.2 x64
PiotrMP6
Junior Member
Junior Member
Posts: 10
Joined: 2021-06-18, 05:49 UTC

Re: Why is it not working? ZIP=C:\Program Files\WinRAR\WinRAR.exe

Post by *PiotrMP6 »

I want to create a .zip archive using WinRAR

ZIP=C:\Program Files\WinRAR\WinRAR.exe
User avatar
Gral
Power Member
Power Member
Posts: 1460
Joined: 2005-01-26, 15:12 UTC

Re: Why is it not working? ZIP=C:\Program Files\WinRAR\WinRAR.exe

Post by *Gral »

You can use WinRAR for zip by packer interface if you configure WinRAR as a RAR packer with -afzip option, so TC will create ZIP files with RAR extension. (You can change this on packer dialog window) As Horst.Epp wrote it is impossible to define WinRAR as a ZIP packer - uses different command line options.

P.S. I just tried - you can define WinRAR as a ZIP packer if you add "a" command:
C:\Program Files\WinRAR\WinRAR.exe a -afzip
WinRAR display request for password then, sometimes TC display error "unknown option", while pack works.
But be careful - you can get unexpected behaviour.
User avatar
HerbieH
Member
Member
Posts: 145
Joined: 2003-02-11, 10:04 UTC

Re: Why is it not working? ZIP=C:\Program Files\WinRAR\WinRAR.exe

Post by *HerbieH »

Is there a reason, why you would want to make WinRar the default zip packer?

Please don't take this as a 'I know better!' type of question. Everybody can do, what they want, at least in regard to TC. 8).
I'm just curious about, if there are any advantages in doing, what you ask.

Myself, I'm still using this old one as a zip-packer:

Code: Select all

ZIP=%COMMANDER_PATH%\Wcmdzip#.exe
In Configuration / Zip-packer, i have furthermore enabled the option: Use ZIP-NT 2.01
This was originally recommended by Christian Ghisler, but many things has changed since 1993, sooo.. ?

I haven't changed from 'Wcmdzip#.exe' because, it still seems to work on Windows 10, - and as Cogsworth says, 'If it isn't baroque, don't fix it.' :lol:
HerbieH*
-Keep on makin' music!
bobputnam
Junior Member
Junior Member
Posts: 77
Joined: 2003-05-26, 12:31 UTC
Location: Connecticut, USA

Post by *bobputnam »

Re: Why is it not working? ZIP=C:\Program Files\WinRAR\WinRAR.exe

No quotes required?
Bob P
3-User License 71012
User avatar
Gral
Power Member
Power Member
Posts: 1460
Joined: 2005-01-26, 15:12 UTC

Re: Why is it not working? ZIP=C:\Program Files\WinRAR\WinRAR.exe

Post by *Gral »

Nope.
TC internally sends parameters/switches/commands/options to packer.
They are different for ZIP compared with these for WinRAR.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Why is it not working? ZIP=C:\Program Files\WinRAR\WinRAR.exe

Post by *ghisler(Author) »

I cannot recommend doing this even if it seems to work with parameters
a -afzip
because WinRAR uses different command line options than info-zip or pkzip. So checking/unchecking options in the pack dialog like "Also pack path names" can have unexpected results.
Author of Total Commander
https://www.ghisler.com
User avatar
Gral
Power Member
Power Member
Posts: 1460
Joined: 2005-01-26, 15:12 UTC

Re: Why is it not working? ZIP=C:\Program Files\WinRAR\WinRAR.exe

Post by *Gral »

As i wrote earlier.

But configure WinRAR as a RAR packer with -afzip option should be safe, right?
So only drawback here would be create ZIP file with RAR extension (may be change at packer dialog).

Another way is to use WinRAR as a ZIP packer through MULTIARC.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Why is it not working? ZIP=C:\Program Files\WinRAR\WinRAR.exe

Post by *ghisler(Author) »

-afzip option only tells WinRAR to create ZIP archives instead of RAR archives. The other switches like "encrypt" or "include full path" are still those of WinRAR, not those of pkzip or info-zip sent by TC.
Another way is to use WinRAR as a ZIP packer through MULTIARC.
That would definitely be a much better solution.
Author of Total Commander
https://www.ghisler.com
User avatar
Gral
Power Member
Power Member
Posts: 1460
Joined: 2005-01-26, 15:12 UTC

Re: Why is it not working? ZIP=C:\Program Files\WinRAR\WinRAR.exe

Post by *Gral »

I wrote about configure WinRAR as a RAR packer with ZIP create option!
But configure WinRAR as a RAR packer with -afzip option should be safe, right?
So only drawback here would be create ZIP file with RAR extension (may be change at packer dialog).
So all switches for RAR are valid, right?
In this case WinRAR create ZIP archive with RAR extension.

P.S. Just tried - encrypt works properly.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Why is it not working? ZIP=C:\Program Files\WinRAR\WinRAR.exe

Post by *ghisler(Author) »

Ah, that's what you mean! Yes, it should work, but wouldn't it create files with extension .RAR?
Author of Total Commander
https://www.ghisler.com
User avatar
Gral
Power Member
Power Member
Posts: 1460
Joined: 2005-01-26, 15:12 UTC

Re: Why is it not working? ZIP=C:\Program Files\WinRAR\WinRAR.exe

Post by *Gral »

Exactly. What i describe as a only drawback, and extension can be change on "Pack files" dialog window.

Another good way is create button as a Horst.Epp advised.
Here slightly modified version - no need to enter ZIP name as a using "ag" switch - name is created from datetime.

Code: Select all

TOTALCMD#BAR#DATA
"C:\Program Files\WinRAR\WinRAR.exe" a -r -afzip -ag
%T @%UL
C:\Program Files\WinRAR\WinRAR.exe
WinRAR (ZIP)

0
-1
Post Reply