回复 7# zseed - @echo off
- for /f %%i in ('PowerShell -Command "&{Get-Date (Get-Date).AddDays(-1) -uformat "%%Y%%m%%d"}"') do (
- set DstDate=%%i
- )
-
- >c:\ftp.txt echo open 192.168.2.86
- >>c:\ftp.txt echo admin
- >>c:\ftp.txt echo 123
- >>c:\ftp.txt echo cd %DstDate%
- >>c:\ftp.txt echo lcd D:\yzykt
- >>c:\ftp.txt echo bin
- >>c:\ftp.txt echo mget *.txt
- >>c:\ftp.txt echo quit
-
- start ftp -v -i -s:"c:\ftp.txt"
复制代码
|