I don't take credit for this, found it on the internet and just thought someone could find this useful for their rsps. Save as AutoRar.bat in your source and just run it (You heard me, JUST DO IT.)as it automatically update your packages and directories. Make sure to change out the coloured text(input/output) with the correct directories to make it work. =)
Code:
@echo off
title Auto Backup (RSPS)
echo Starting
cdC:\source or client directory here
SET PATH=C:;C:\Program Files (x86)\WinRAR;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;%PATH%
FOR /f "delims=" %%d IN ('DIR /B') DO WinRAR a -m0 -ep -df -x*.rar "C:\new directory where backup files go\%%~nxd.rar" "%%~fd"
move /-y "C:\source and client directory here\*.rar" "C:\new directory where backup files go\"
echo Completed backup on %DATE:~6,4%%DATE:~3,2%%DATE:0,2%
pause
exit
Where -x*.rar means ¨exclude all .rar files¨. You can add more files to exclude for example add another -x*.zip
Compressing in multivolumes:
FOR /f "delims=" %%d IN ('DIR /B') DO WinRAR a -m0 -ep -df -x*.rar -v100m "
C:\new directory where backup files go\%%~nxd.ra r" "%%~fd"
To unrar secured password archives:
ECHO OFF
cd
C:\change this directory for secured rars
title Secured Archive Extractor
echo Starting
SET PATH=C:;C:\Program Files (x86)\WinRAR;C:\Windows\system32;C:\Windows;C:\Win dows\System32\Wbem;%PATH%
FOR /f "delims=" %%d IN ('DIR /B') DO unRaR e -p123456 *.rar
C:\change this directory for the output directory
echo Completed
pause
exit
To create a new scheduled task go Start>All Programs>Accessories>System Tools>Task Scheduler and from here follow the wizard
Hope that helps most of you lads, enjoy