[Date Prev][Date Next][Date Index]
[etc] Backup.bat script for Win2K
:: Get system's current date into multiple variables
@echo off
if "%1"=="GoTo" goto %2
echo e180 BF 07 01 B4 04 CD 1A E8 02 00 89 CA E8 00 00> %temp%.\t1.src
echo e18F 86 D6 88 D0 D4 10 0D 30 30 86 C4 AB 47 C3>> %temp%.\t1.src
for %%? in (rip 180 g w q) do echo %%?>> %temp%.\t1.src
echo SET %%1=XX XX XX XX> %temp%.\t2.bat
DEBUG %temp%.\t2.bat < %temp%.\t1.src > nul
call %temp%.\t2.bat _
%0 GoTo parse %_% MM DD YC YY
:parse
set %7=%3
shift
if not "%7"=="" goto parse
for %%? in (t1.src t2.bat) do del %temp%.\%%?
set _=
echo DAY=%DD% %MM% %YC% %YY%
:: ---------END-------
:: Start of the backup Script ::
SET AUTHOR=Shashank Khanvilkar
SET ZIP_FILE=c:\backup\filmBackup.zip
set INPUT_FILEs=c:\shashank
:: set INPUT_FILEs=c:\shashank\cs385 c:\shashank\ece225
:: set INPUT_FILEs=%INPUT_FILEs% c:\shashank\ece333 ::
:: set EXCLUDE_FILES=-x *.pdf ::
set ZIP_OPTIONS=-urv
zip %ZIP_OPTIONS% %ZIP_FILE% %INPUT_FILES% %EXCLUDE_FILES%
scp2 %ZIP_FILE% abcd@1.2.3.4:tarballs/filmBackup%MM%%DD%%YY%.zip
Comments and corrections are appreciated and can be sent to
papers@mia.ece.uic.edu.
Click here for ©opyright information.
|