Content of exprar.bat
@echo off
set datdir=d:/Backup/dat
set bindir=d:/Backup/bin
if %1aaa==aaa goto err
set dmpname=%datdir%/%1
exp %1/%2@%3 consistent=yes file=%dmpname%
REM name the rar file with weekday
REM a month of backup
rem %bindir%/rar.exe m -agDD %dmpname% %dmpname%.dmp
REM a week of backup
rem %bindir%/rar.exe m -agA %dmpname% %dmpname%.dmp
REM 10 days of backup
%bindir%/rar.exe m -agD %dmpname% %dmpname%.dmp
xcopy %datdir%/*.rar //192.168.0.21/backup/dat/ /d /y
:err