Winrar buttons on command bar

English support forum

Moderators: Hacker, petermad, Stefan2, white

HAL 9000
Senior Member
Senior Member
Posts: 384
Joined: 2007-09-10, 13:05 UTC

Winrar buttons on command bar

Post by *HAL 9000 »

I would like to have extract to and extract here buttons on my command bar. Is it possible to create this?
User avatar
tbeu
Power Member
Power Member
Posts: 1354
Joined: 2003-07-04, 07:52 UTC
Location: Germany
Contact:

Post by *tbeu »

I use the following commands:

Code: Select all

TOTALCMD#BAR#DATA
%COMMANDER_PATH%\Packer\RAR\WinRAR.exe
x %P%N "%P"
%COMMANDER_PATH%\WCMICONS.DLL,31
Extract RAR (Source)
%COMMANDER_PATH%\Packer\RAR

-1
for copying to the source directory and

Code: Select all

TOTALCMD#BAR#DATA
%COMMANDER_PATH%\Packer\RAR\WinRAR.exe
x %P%N "%T"
%COMMANDER_PATH%\WCMICONS.DLL,31
Extract RAR (Target)
%COMMANDER_PATH%\Packer\RAR

-1
for copying to the specified target directory. You can copy the selected commands and paste it to the button bar using right mouse click. Do not forget to adapt the path to WinRar.exe.
TC plugins: Autodesk 3ds Max / Inventor / Revit Preview, FileInDir, ImageMetaData (JPG Comment/EXIF/IPTC/XMP), MATLAB MAT-file Viewer, Mover, SetFolderDate, Solid Edge Preview, Zip2Zero and more
HAL 9000
Senior Member
Senior Member
Posts: 384
Joined: 2007-09-10, 13:05 UTC

Post by *HAL 9000 »

Thank you but where I should add this commands?
User avatar
sqa_wizard
Power Member
Power Member
Posts: 3893
Joined: 2003-02-06, 11:41 UTC
Location: Germany

Post by *sqa_wizard »

2HAL 9000: The code above are just 2 buttons for your buttonbar.

Just mark the 1st code part from "TOTALCMD#BAR#DATA " to "-1" and press Ctrl-C to copy it.
Now do a click with right mouse button on your TC button bar and select "Paste" command from context menu.

Magically a new button is created.

Do the same for the 2nd code part and you get a 2nd button ...
#5767 Personal license
HAL 9000
Senior Member
Senior Member
Posts: 384
Joined: 2007-09-10, 13:05 UTC

Post by *HAL 9000 »

In this code, path selection dialog box doesn't appear, how can I make it?

Code: Select all

TOTALCMD#BAR#DATA 
%COMMANDER_PATH%\Packer\RAR\WinRAR.exe 
x %P%N "%T" 
%COMMANDER_PATH%\WCMICONS.DLL,31 
Extract RAR (Target) 
%COMMANDER_PATH%\Packer\RAR 

-1
User avatar
Mikefield
Power Member
Power Member
Posts: 628
Joined: 2006-02-26, 19:13 UTC
Location: Oberursel, Germany HE

Post by *Mikefield »

HAL 9000 wrote:In this code, path selection dialog box doesn't appear, how can I make it?
The same here, but if you hover with the mouse over it, you will see, it is there.
Right mouse button over the place you past it, change, and than the Icon is shown.
Or remove the space after ,31 in the code.
Every line has a space added on the end when paste and this gives the problem.

Had this problem very often, that after copy and paste of code from forums, than a space
is added on every line on the end. Not sure if Christian can solve this.

mf
Bankster - Word of the Year 2009
HAL 9000
Senior Member
Senior Member
Posts: 384
Joined: 2007-09-10, 13:05 UTC

Post by *HAL 9000 »

I see the button. I mean the dialog box of path selection doesn't appear, it extracts files to default dir without asking me.

When you select extract to from context menu it shows a path selection dialog but that button is different no path selection dialog appears.
User avatar
Mikefield
Power Member
Power Member
Posts: 628
Joined: 2006-02-26, 19:13 UTC
Location: Oberursel, Germany HE

Post by *Mikefield »

Ohh, I see. Yes, it extract in the other panel without any user request.

mf

Add: You can use cm_UnpackFiles instead. It works also with rar files.

Code: Select all

TOTALCMD#BAR#DATA
cm_UnpackFiles

wciconex.dll,31


0
509
mf
Bankster - Word of the Year 2009
HAL 9000
Senior Member
Senior Member
Posts: 384
Joined: 2007-09-10, 13:05 UTC

Post by *HAL 9000 »

But this button extracts files only to the other panel's destination. With winrar "extract files.." command I would be able to extract to path I wanted without changing the other panel.
User avatar
dott
Senior Member
Senior Member
Posts: 285
Joined: 2007-03-04, 00:58 UTC
Location: La Plata, Argentina

Post by *dott »

Autohotkey macros are the best solution, IMHO, there is no need of external programs(only Autohotkey ;)), tc is enough.

Extract_to_target_dir.ahk

Code: Select all

Send, {ALTDOWN}{F9}{ALTUP}{ENTER}
Extract_here.ahk

Code: Select all

Send, {ALTDOWN}{F9}{ALTUP}{DEL}{ENTER}
Just drag and drop each one of these .ahk files to the button bar
HAL 9000
Senior Member
Senior Member
Posts: 384
Joined: 2007-09-10, 13:05 UTC

Post by *HAL 9000 »

I think there should be a winrar parameter that do this. I checked winrar help file for extraction path command it mention X for it but I couldn't succeed.
"Extract files to the specified folder" command


--------------------------------------------------------------------------------


This command is accessible both in file management and in archive management modes.

In the archive management mode, when WinRAR shows archive contents, first, you need to select archived files and folders, which are to be extracted. Then run "Extract files to the specified folder" command using either Commands menu, "Extract to" button on the toolbar or Alt+E keyboard shortcut. In the Extraction path and options dialog you may specify the destination folder for extracted files and, if necessary, set additional options. After closing this dialog, extraction is started.

In the file management mode it is possible to unpack several archives at once. In general the operation is similar to the described in the previous paragraph, but instead of selecting files inside of archive you need to select archives and folders, where WinRAR should search for archives. If any archives are found, the Extraction path and options dialog will be displayed. After closing this dialog contents of all found archives will be extracted.

Command line equivalent: command "x"

Code: Select all

TOTALCMD#BAR#DATA 
%COMMANDER_PATH%\Packer\RAR\WinRAR.exe 
x %P%N "%T" 
%COMMANDER_PATH%\WCMICONS.DLL,31 
Extract RAR (Target) 
%COMMANDER_PATH%\Packer\RAR 

-1
User avatar
ZoSTeR
Power Member
Power Member
Posts: 1049
Joined: 2004-07-29, 11:00 UTC

Post by *ZoSTeR »

To get the "Extraction patch and options" dialog you have to use "?\" as the target parameter.

Example:

Code: Select all

"C:\Program Files\WinRAR\WinRAR.exe" x -- "E:\Test_RAR\Test_File.rar" "?\"
You can also append any existing path as the default target. E.g. "?c:\Program Files\" or "?%T" for the TC target path.

WinRAR adds the archive name to the path by default. Disable Options -> Compression -> Append archive name to path

Note: the "--" just stops the switch scanning.
HAL 9000
Senior Member
Senior Member
Posts: 384
Joined: 2007-09-10, 13:05 UTC

Post by *HAL 9000 »

I tried to modify the code but did not suceed, could you give the full code?
User avatar
ZoSTeR
Power Member
Power Member
Posts: 1049
Joined: 2004-07-29, 11:00 UTC

Post by *ZoSTeR »

Code: Select all

TOTALCMD#BAR#DATA
%COMMANDER_PATH%\Packer\RAR\WinRAR.exe
x %P%N "?%T"
%COMMANDER_PATH%\WCMICONS.DLL,31
Extract RAR (Target)
%COMMANDER_PATH%\Packer\RAR

-1
or

Code: Select all

TOTALCMD#BAR#DATA
%COMMANDER_PATH%\Packer\RAR\WinRAR.exe
x %P%N "?%P"
%COMMANDER_PATH%\WCMICONS.DLL,31
Extract RAR (Same Folder)
%COMMANDER_PATH%\Packer\RAR

-1
User avatar
nsp
Power Member
Power Member
Posts: 1912
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Post by *nsp »

HAL 9000 wrote:I tried to modify the code but did not suceed, could you give the full code?
Try this !

Code: Select all

TOTALCMD#BAR#DATA
%COMMANDER_PATH%\Packer\RAR\WinRAR.exe
x -- "%P%N" "?%T"
%COMMANDER_PATH%\WCMICONS.DLL,31
Extract RAR (Target)
%COMMANDER_PATH%\Packer\RAR

-1
[/code]
Post Reply