@echo off & setlocal EnableDelayedExpansion
:began
set mystr=
echo.
echo.
echo.
echo.
set /p mystr=*** 输入年月日8位日期(直接回车退出):
echo.
if not defined mystr goto :exit
for /l %%i in (0,1,1000) do if "!mystr:~%%i,1!"=="" set strlen=%%i && goto :_endfor
:_endfor
if %strlen%==8 goto :goon
set strlen= &goto began
@echo off
:goon
cd\
@echo open >c:\2.txt
@echo *.*.*.*>>c:\2.txt
@echo user>>c:\2.txt
@echo user>>c:\2.txt
@echo cd /111/222>>c:\2.txt
@echo ls *%mystr%*.TXT c:\3.txt>>c:\2.txt
@echo bye>>c:\2.txt
@ftp -s:c:/2.txt
pause
cls
@echo =============
@echo 上传的文件有:
@echo =============
type c:\3.txt
echo ===============================
pause
del c:\3.txt
del c:\2.txt
exit作者: vkill 时间: 2007-1-24 09:08
Quote:
Originally posted by l23542 at 2007-1-23 12:22:
学批处理的处女作
通过阅读论坛的帖子,经过N次实验,我终于写出并通过,在此,对本论坛的帮助表示感谢。这个批命令借用了个别帖子的一些脚本 ...