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.
@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
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
(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
This way you only see the echo statements.
Thanks again ;)
Regards Alejandro
How about plain ol' GNU tar and gzip? They're both available in the UnxUtils package, and form large part of our backup strategy.
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.