轮转Windows下bandwidthd中html文件夹的Batch File

1673阅读 0评论2010-02-03 零二年的夏天
分类:WINDOWS

一个用来轮转Windows下bandwidthd中html文件夹的Batch File。



@ECHO Off
REM================================
REM
REM================================

set nowDate=%date:/=-%
set nowDate=%nowDate: =-%
set nowTime=%time::=-%
set nowTime=%nowTime:~0,7%
set now=%nowdate%-%nowtime%

set year=%date:~0,4%
set month=%date:~5,2%
set day=%date:~8,2%


set baseDir=d:\bandwidthd
set sourceDir=%baseDir%\htdocs
REM set destinationDir=%baseDir%\history\%year%\%now%
set destinationDir=%baseDir%\history\%year%\%month%\%now%


rem if not exist %baseDir%\history\%year% (
rem    mkdir %baseDir\history\%year%
rem )

mkdir %destinationDir%

taskkill /t /f /im cygrunsrv.exe
taskkill /t /f /im bandwidthd.exe

net stop bandwidthd
copy %sourceDir% %destinationDir%\
net start bandwidthd



@ECHO ON


上一篇:解决Active Directory超过墓碑时间的复制问题
下一篇:Sharepoint的备份