Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Winrar -- command line to add and update an archive

Posted on 2011-09-30
4
Medium Priority
?
802 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 1000 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

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

This post contains step-by-step instructions for setting up alerting in Percona Monitoring and Management (PMM) using Grafana.
Want to know how to use Exchange Server Eseutil command? Go through this article as it gives you the know-how.
Viewers will learn how to use the Hootsuite Dashboard.
This video Micro Tutorial shows how to password-protect PDF files with free software. Many software products can do this, such as Adobe Acrobat (but not Adobe Reader), Nuance PaperPort, and Nuance Power PDF, but they are not free products. This vide…

705 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