########################################

Windows BACKUP 배치파일

########################################


type e:\www_full_backup.bat
@echo off
cd e:\www1_backup\
del *.rar
cd e:\www2_backup\
del *.rar
cd e:\www3_backup\
del *.rar
cd e:\www4_backup\
del *.rar
cd e:\www5_backup\
del *.rar
cd e:\
dir d:\www1 /b/a:d > }1{.tmp
for /F %%a in ('type }1{.tmp') do rar a -agYYYYMMDD -m0 e:\www1_backup\%%a-.rar d:\www1\%%a
del }1{.tmp
dir d:\www2 /b/a:d > }1{.tmp
for /F %%a in ('type }1{.tmp') do rar a -agYYYYMMDD -m0 e:\www2_backup\%%a-.rar d:\www2\%%a
del }1{.tmp
dir d:\www3 /b/a:d > }1{.tmp
for /F %%a in ('type }1{.tmp') do rar a -agYYYYMMDD -m0 e:\www3_backup\%%a-.rar d:\www3\%%a
del }1{.tmp
dir d:\www4 /b/a:d > }1{.tmp
for /F %%a in ('type }1{.tmp') do rar a -agYYYYMMDD -m0 e:\www4_backup\%%a-.rar d:\www4\%%a
del }1{.tmp
dir d:\www5 /b/a:d > }1{.tmp
for /F %%a in ('type }1{.tmp') do rar a -agYYYYMMDD -m0 e:\www5_backup\%%a-.rar d:\www5\%%a
del }1{.tmp
ftp -s:ftp_192.168.100.10.txt


type e:\ftp_192.168.100.10.txt
open 192.168.100.10
login_id
password
bin
prompt
cd 192.168.100.12
cd www1
mdelete *.*
lcd www1_backup
mput *.*
lcd ..
cd ..
cd www2
mdelete *.*
lcd www2_backup
mput *.*
lcd ..
cd ..
cd www3
mdelete *.*
lcd www3_backup
mput *.*
lcd ..
cd ..
cd www4
mdelete *.*
lcd www4_backup
mput *.*
lcd ..
cd ..
cd www5
mdelete *.*
lcd www5_backup
mput *.*
lcd ..
cd ..
quit

2008/11/14 12:00 2008/11/14 12:00

트랙백 주소 :: http://thinkit.or.kr/windows/trackback/1810