- @echo off
- for /f "tokens=2 delims==" %%a in ('wmic path win32_operatingsystem get LocalDateTime /value') do set "t=%%a"
- set "t=%t:~4,2%"
- set /a t-=1
- set "t=00%t%"
- (
- echo,open 10.170.0.101
- echo,user admin 123456
- echo,cd /mac
- echo,put "D:\temp\公司%t:~-2%月业务报表.doc"
- echo,bye
- echo,exit
- )>ftp.txt
- ftp -n -i -s:ftp.txt 10.170.0.101
- del ftp.txt
- pause & exit
复制代码
|