Chinaunix首页 | 论坛 | 博客
  • 博客访问: 205361
  • 博文数量: 48
  • 博客积分: 10
  • 博客等级: 民兵
  • 技术积分: 1525
  • 用 户 组: 普通用户
  • 注册时间: 2011-02-21 22:15
文章分类

全部博文(48)

文章存档

2010年(2)

2009年(13)

2008年(33)

我的朋友

分类: WINDOWS

2010-02-03 13:48:51

一个用来轮转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


阅读(1011) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~