Winrar buttons on command bar
Moderators: Hacker, petermad, Stefan2, white
Winrar buttons on command bar
I would like to have extract to and extract here buttons on my command bar. Is it possible to create this?
I use the following commands: for copying to the source directory and 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.
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
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
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
- sqa_wizard
- Power Member
- Posts: 3893
- Joined: 2003-02-06, 11:41 UTC
- Location: Germany
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 ...
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
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
The same here, but if you hover with the mouse over it, you will see, it is there.HAL 9000 wrote:In this code, path selection dialog box doesn't appear, how can I make it?
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
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.
mf
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
Bankster - Word of the Year 2009
Autohotkey macros are the best solution, IMHO, there is no need of external programs(only Autohotkey
), tc is enough.
Extract_to_target_dir.ahk
Extract_here.ahk
Just drag and drop each one of these .ahk files to the button bar

Extract_to_target_dir.ahk
Code: Select all
Send, {ALTDOWN}{F9}{ALTUP}{ENTER}
Code: Select all
Send, {ALTDOWN}{F9}{ALTUP}{DEL}{ENTER}
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
To get the "Extraction patch and options" dialog you have to use "?\" as the target parameter.
Example:
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.
Example:
Code: Select all
"C:\Program Files\WinRAR\WinRAR.exe" x -- "E:\Test_RAR\Test_File.rar" "?\"
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.
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: 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
Try this !HAL 9000 wrote:I tried to modify the code but did not suceed, could you give the full code?
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