首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 操作系统 > windows >

ftp 征集日志文件 windows脚本

2012-08-09 
ftp 收集日志文件 windows脚本1 定时任务? looptask.bat@echo offsetlocal ENABLEDELAYEDEXPANSIONset /a

ftp 收集日志文件 windows脚本

1 定时任务? looptask.bat

@echo off
setlocal ENABLEDELAYEDEXPANSION
set /a next_hour=0
set /a next_minute=0
for /F "tokens=1,2 delims=:" %%i in ('TIME /T') do (
set /a next_minute=%%j+5
set /a next_hour=%%i
if !next_minute! GEQ 60 (
set /a next_minute=!next_minute!-60
set /a next_hour=!next_hour!+1
if !next_hour! GEQ 24 set /a next_hour=!next_hour!-24
)
)
at !next_hour!:!next_minute! "F:\ftp\looptask.bat"

at !next_hour!:!next_minute! "F:\ftp\ftpfiletrans.bat"


endlocal
@echo on

?

2?ftp 执行脚本命令? ftpfiletrans.bat

?ftp?? -i?? -s:f:\ftp\fscript.txt??

?

3? 具体收集日志脚本? fscript.txt

?

open 172.18.0.4??
root
root
bin??
put f:\ftp\wint.txt??
bye??

?

热点排行