@echo off &SetLocal EnableDelayedExpansion
set /p number=请输入数字:
if not defined number exit/b
for /F "delims=" %%a in ('dir /s/b/a-d j:\cd\*.bat') do (
set /a temp+=1
(
echo Shell!temp!Caption=
echo Shell!temp!Command=%%a
echo\
)>>SETUP.INI
if !temp! equ %number% goto :eof
)
有时间多看看for相关的教程.
Last edited by lxmxn on 2007-9-25 at 09:16 PM ]