Solved

Winrar -- command line to add and update an archive

Posted on 2011-09-30
4
536 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 37

Expert Comment

by:Gerwin Jansen
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 37

Accepted Solution

by:
Gerwin Jansen 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Healthcare organizations in the United States must adhere to the guidance of both the HIPAA (Health Insurance Portability and Accountability Act) and HITECH (Health Information Technology for Economic and Clinical Health Act) for securing and protec…
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
This tutorial will walk an individual through the process of installing of Data Protection Manager on a server running Windows Server 2012 R2, including the prerequisites. Microsoft .Net 3.5 is required. To install this feature, go to Server Manager…
An overview on how to enroll an hourly employee into the employee database and how to give them access into the clock in terminal.

895 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now