Jump to content

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


Recommended Posts

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
Link to comment
Share on other sites

  • Moderators

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.

Link to comment
Share on other sites

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.
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...