Solved

Winrar -- command line to add and update an archive

Posted on 2011-09-30
4
645 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

Is your phone running out of space to hold pictures?  This article will show you quick tips on how to solve this problem.
Invest in your employees with these five simple steps to improve employee engagement and retention.
This tutorial will walk an individual through the steps necessary to enable the VMware\Hyper-V licensed feature of Backup Exec 2012. In addition, how to add a VMware server and configure a backup job. The first step is to acquire the necessary licen…
The viewer will learn how to successfully create a multiboot device using the SARDU utility on Windows 7. Start the SARDU utility: Change the image directory to wherever you store your ISOs, this will prevent you from having 2 copies of an ISO wit…

710 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