|
不知道这样行不行?
@echo off
setlocal ENABLEDELAYEDEXPANSION
set n=0
SET PAN=D:
SET GHOXP=%PAN%\SYS\XP.GHO
SET GHOW7=%PAN%\SYS\WIN7.GHO
for /f "delims=" %%i in ('dir /b /a-d /s "%PAN%\*.GHO"') do (
if /i not "%GHOXP%"=="%%i" (
if /i not "%GHOW7%"=="%%i" (
set /a n=!n!+1
echo set A!n!=%%i >>c:\123.bat
)
)
)
type c:\123.bat
--------------------------------分割线-------------------------------
运行c:\123.bat自动设置变量A1,A2......
|
|