@echo off
setlocal enabledealyedexpansion
for /l %%i in (1001,1,1100) do (
set dn=%%i
md !dn:~1,3!
)
echo OK!
pause
已测试 可以
@echo off
setlocal EnableDelayedExpansion
for /l %%i in (1001,1,1100) do (
set a=%%i
md !a:~1!
)
echo OK!
pause
@ECHO OFF
FOR /L %%i IN (1001,1,1100) DO (
CALL :MDIR %%i
)
GOTO :EOF
:MDIR
SET A=%1
MD %a:~1,3%
GOTO :EOF