Solved

Winrar -- command line to add and update an archive

Posted on 2011-09-30
4
587 Views
Last Modified: 2012-05-12
Hi, we are using WinRar 4.01 32bit version in WinXP.  
I would like to backup some files to a .rar file.
What is the switches to use if I want to copy all the files to the same archive file so that not all files are added but only the files that are changed or new files.  This way, the process to compress the files (for backup purposes) to a rar file doesn't take as long.
0
Comment
Question by:McKuser
  • 2
  • 2
4 Comments
 
LVL 38

Expert Comment

by:Gerwin Jansen, EE MVE
ID: 36894429
In the folder where you've installed WinRar, there should be commandline versions as well, rar.exe and unrar.exe

To create/update a .rar file do this:

rar.exe u <archive> <files...>

Open in new window


If you want to know all options available (a lot), do this:

rar.exe -?

Open in new window


0
 

Author Comment

by:McKuser
ID: 36894882
Thanks. I am aware of the command line options but not sure which one actually does what.  The ones I know are "rar -a -u -f..." which are add, update and freshen respectively.  However, I'm confused as what update and freshen are? Like what is the difference between them.
0
 
LVL 38

Accepted Solution

by:
Gerwin Jansen, EE MVE earned 250 total points
ID: 36895679
Well, "a - add" is clear: just add the files that you list to the (existing) archive. When the archive does not exist, it is created.

"u - update" is updating files that you list in the existing archive when they have been modified, files that you point to that are not modified will not be updated in the archive. Will add new files as well.

"f - freshen" is also updating files that you list in the existing archive, same as u-update but will not add new files to the existing archive.

So the difference between u and f is that one adds new files and the other doesn't, you want to use "u - update" for your backup question.

Note that the "-a -u -f" you write is not correct, commands are written as "a u f" and switches are written with the - character.
0
 

Author Comment

by:McKuser
ID: 36904314
Thanks for the info between u and f.  Makes sense.  

I tried the syntax you mentioned but they didn't work.  I think u and f are switches and must have the dash.  However, rar won't allow me to use more than one switches, so when I used "rar a -u..." it worked.  I guess using both u and f makes no sense since u does the freshen switch also.  
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
Concerto Cloud Services, a provider of fully managed private, public and hybrid cloud solutions, announced today it was named to the 20 Coolest Cloud Infrastructure Vendors Of The 2017 Cloud  (http://www.concertocloud.com/about/in-the-news/2017/02/0…
This tutorial will walk an individual through configuring a drive on a Windows Server 2008 to perform shadow copies in order to quickly recover deleted files and folders. Click on Start and then select Computer to view the available drives on the se…
This tutorial will show how to configure a single USB drive with a separate folder for each day of the week. This will allow each of the backups to be kept separate preventing the previous day’s backup from being overwritten. The USB drive must be s…

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question