Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've written a wee batch script to backup some stuff on my desktop and dump it over the network to a share... The only thing that's bugging me is the verbosity of rar.exe while it's doing the compress part of the job.

Anyone know if it's possible to tweak rar.exe to display a status bar for the entire process of at least suppress the output of each individual file being added to the archive.

Alternatively, if theres any other command line compression tools for windows (winzip/7zip) that people are familiar with, I'd be happy to use those either. Or any suggestions to make this batch job a little more robust.

Thanks, Eoin C

---------------------------------------------------------------------


@echo off
echo "Beginning Compress Job"

"C:\Program Files\WinRar\rar.exe" a -agyyyy-MM-dd -r "C:\Archives\" "C:\Work\Folder1\" "C:\Work\Folder2\" "C:\Work\Folder3\" 

echo "Files backed up to C:\Archives"

NET USE U: > %TMP%\JunkerFile 2>&1
IF %ERRORLEVEL% == 0 GOTO Success
echo "Drive Disconnected - Cannot Copy Backup To U:\"
GOTO End
:Success
        echo "Drive Connected"
        echo "Performing Backup"
        move C:\Archives\*.rar U:\Archives\
        echo "Backup Complete"
        GOTO End
:End

pause
---------------------------------------------------------------------
share|improve this question

4 Answers 4

up vote 2 down vote accepted

if you want to suppress the output just add > null at the end of command line for rar.exe.

I use 7-zip's command line tool and I am pretty happy with it. its just a single exe.

http://dotnetperls.com/7-zip-examples

share|improve this answer

How about plain ol' GNU tar and gzip? They're both available in the UnxUtils package, and form large part of our backup strategy.

share|improve this answer

I'm afraid winrar does not offer command line switches to change it's verbosity level. Ironically it does allow for changes to the gui progress bar. ;-)

I would assume a CPU/disk indicator could be used to know it's still crunching.

Sorry.

share|improve this answer

(first of all, sorry for my horroble english)

Thanks for this very useful script!!!

About that messages, in the version 3.42 the winrar there is a param call inul that you can use to turn off all message. Using your example

"C:\Program Files\WinRar\rar.exe" a -agyyyy-MM-dd -r -inul "C:\A...

This way you only see the echo statements.

Thanks again ;)

Regards Alejandro

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.