Solved

Winrar -- command line to add and update an archive

Posted on 2011-09-30
4
514 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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 Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

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…
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…
To efficiently enable the rotation of USB drives for backups, storage pools need to be created. This way no matter which USB drive is installed, the backups will successfully write without any administrative intervention. Multiple USB devices need t…
This tutorial will show how to configure a new Backup Exec 2012 server and move an existing database to that server with the use of the BEUtility. Install Backup Exec 2012 on the new server and apply all of the latest hotfixes and service packs. The…

743 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

14 Experts available now in Live!

Get 1:1 Help Now