Jump to content
Sign in to follow this  
sstanfie

Rar files in a directory - each file in a separate .rar

Recommended Posts

sstanfie

Hello. I'm trying to write a script to rar files in a directory and put each file in a separate .rar. Winrar has an option in the UI to "Put each file to a separate archive", but I don't see the same option using rar.exe

I want to rar c:\PerfLogs\*.blg into separate .rar files.

Will I have to read in each file in this dir with AutoIt and rar them one at a time? Can someone please post an example of how this can be done?

Thank you very much in advance.

Edited by sstanfie

Share this post


Link to post
Share on other sites
sstanfie

So, if I had asked this question in the General Support forum, THEN you would replied with something other than a smart ass answer?? Instead you're now the forum police? :P lol

Share this post


Link to post
Share on other sites
SmOke_N

Hello. I'm trying to write a script to rar files in a directory and put each file in a separate .rar. Winrar has an option in the UI to "Put each file to a separate archive", but I don't see the same option using rar.exe

I want to rar c:\PerfLogs\*.blg into separate .rar files.

Will I have to read in each file in this dir with AutoIt and rar them one at a time? Can someone please post an example of how this can be done?

Thank you very much in advance.

Any particular reason it has to be a "rar" file? I know someone just did some work on it in the example scripts forum ("UnRarIt" by Rasim), but I can't imagine there being as much info on rar files here other than that, as there would be on say... 7zip.

So, if I had asked this question in the General Support forum, THEN you would replied with something other than a smart ass answer?? Instead you're now the forum police? :P lol

No but I am :P .... *moved*


Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites
sstanfie

Any particular reason it has to be a "rar" file? I know someone just did some work on it in the example scripts forum ("UnRarIt" by Rasim), but I can't imagine there being as much info on rar files here other than that, as there would be on say... 7zip.

No, not necessarily. I'll check it out, thanks.

No but I am :P .... *moved*

Thanks. I tried moving it, but couldn't.

Share this post


Link to post
Share on other sites
pete1234

I'll second 7zip...you can include 7za.exe with your script as a standalone executable and use command line parameters for batch processing. You could read the files into an array, and then run a For loop to compress each file.

Share this post


Link to post
Share on other sites
Bert

I've done some work using RAR on a command line basis. What you are asking for can be done, but what you need to do is specify the command so that you add the one file to the RAR, then loop so the command runs again with the next file and the next RAR. I suspect you want to do in in a batch, but I think the loop will be the way to go. It will be slow however.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×