Winrar / unrar multiple files

Hi,

I have a problem finding the correct way to unrar multiple files with the help of Winrar command.
With a button, I managed to unrar them all, but all in the same time. It's not very efficient...
The best solution is to unrar them sequentialy, but I can't find the correct winrar command to do this.

If someone is kind enough to help me with this, I'll be very grateful :slight_smile:

The winrar syntax is :

I'm trying to use the "@listfiles" parameter with the "x" command, but it doesn't work here.
I'm affraid this @listfiles thing is only working for backup, because this works :

winrar a backup @backup.lst

This thread refers to :
[WinRAR Compress/Decompress Buttons (and other) - #7 by Leo)[/quote]

The best thing to do is get WinRAR working on its own using hand-made command-lines and file-list text files from a Command Prompt (i.e. Opus is not involvemed at all) and then once you have something that works, turn that into an Opus button.

Otherwise you might be trying to solve two problems at the same time which makes things difficult.

I haven't used WinRAR much so I can't help with getting the command-line correct but once that part is worked out the rest should be easy.

exactly, that's what I'm trying, with our old friend DOS :slight_smile:

but I'm unable to pass the @listfiles to the command.

Seems the useage of the @listfiles param is poorly documented by WinRAR. In all of the command line useage examples it SEEMS like you're supposed to be able to use @listfiles with ANY rar command... but as you've seen trying x or e for extracts seems to process the listfile incorrectly. BOGUS on WinRAR...

Anyhow... in the related 'Buttons and Toolbars' thread you posted in first, I think you mentioned that you liked how the WinRAR context menu handled the extract? If so... try creating a toolbar Menu that runs the following Opus function in a button under the menu:

FileType CONTEXTMENU {B41DB860-8EE4-11D2-9906-E49FADC173CA} CONTEXTFORCE

Note!!! If you're doing this with a toolbar... you have to place a Menu item on the actual toolbar, and then add the function above to a Button under that menu... otherwise, the toolbar probably won't show the Context menu items provided by WinRar, since the list is instantiated based on what file types you've got selected, and the toolbar doesn't "refresh" AFTER you select RAR files subsequently to opening a lister... But a button 'under' the menu item will call the extension handler as you expand the menu while RAR files are selected...

Reply back...

I've send a mail to Winrar dev team, I don't know if I'll get an answer...

[quote]to dev@rarlab.com
date Oct 24, 2007 3:40 PM
subject problem with listfiles

Winrar version 3.70.

Hi,

In the help file, is mentionned :
WinRAR - - <files...> <@listfiles...> <path_to_extract>

We encounter a problem using the "x" command with the @listfiles parameter.

For instance, from your help file, this command should work:

winrar x @list.txt d:\unrared\

but it seems impossible to use the @listfiles parameter with the extract command.
The main goal about this is to unrar multiple file using one command.
Does WinRar can handle this ?

If it's really impossible, I think the help file should be clarified, or this feature should be added in a next release :wink:

Thanks for you time,
I hope to get an answer from you.[/quote]

By the way, your solution is quite good, but we came back to the same solution as the right click context menu, so I can't specify automatically an extract path.
For now, I prefer using @sync "C:\Program Files\WinRAR\WinRAR.exe" x {f} "E:\tmp\", because it does the job very well (just have the always on top Opus window ruining a bit the thing, but I'll survive).

PS : the @sync is essential to me, without it, if I unrar 15 .rar, I'll get 15 concurrent winrar process running.

I just received an answer about this :

[quote]from RAR development dev@rarlab.com
reply-to RAR development dev@rarlab.com
date Oct 24, 2007 4:49 PM
subject Re: problem with listfiles
mailed-by rarlab.com

Hello,

Now listfiles are supported only for files to compress or extract,
but not for archive names.

You may try to use Windows 'for' command as a workaround.
Something like:

for /f %1 in (list.txt) do winrar x "%1" d:\unrared\

RAR development
[/quote]

so no big surprise :frowning: it seems we can't enqueue all the archive to be extracted within Winrar, we can only send them one by one to Winrar.

The bad point : we can't have an overall progress bar, and overall ETA.

I'll ask them if they can add such a feature.

PS : you can see in attachments the Always on top window I'm talking about.

Woops... sorry I didn't notice any comment from the other thread about setting the extract path in the button being part of the goal...

Anyway, you might consider using the default extract path in WinRAR's Options->Settings? Then, if you use the Extract files... item from the context menu, it will default to that path the same as if you'd set the path as a command line arg... You DO still get an extract confirmation dialog... but can just hit and the operation continues...

Anyway, just another option to check out to see if it fits what you're after better than any of the other options. Cheers!

I got a new answer from Winrar dev team:

[quote]Hello,

Thank you for suggestions.

Yes, the context menu uses an undocumented switch to pass additional
archive names. But it is not carefully tested with all possible RAR
commands and switches. Also its syntax is not well designed. Maybe
we'll fix these issues in the future and make a documented option
for this purpose.

RAR development[/quote]

If only we could find this switch :stuck_out_tongue:

@steje : thx for the tips, but I can only specify One default path, I wanted to set like 3 or 4 buttons in Opus with different path, but thx again for trying to make my day :stuck_out_tongue:

hi....i havent been following this thread much but a quick look and was surprised what the fuss all about....i hope am not missing somethin

extracting isnt a problem but u say its extracting all at the same time...

well i have this button in my toolbar that i found in the forums only some time back and it does all u want..

select NONE
select all *.(zip|rar|tar|tgz|lha|ace|7z|arj|bz2|gz|lzh|z|exe)
sync:"C:\Program Files\WinRAR\WinRAR.exe" x "{f!}" "{o|noext}"
delete ALL FORCE QUIET

it will extract everytype of archive even self extracting and extract them one by one and delete them after extracting....