1
SET /a _count = 1
set /p drive=Please type drive name[C/D/E/F/..]?:
echo Creating Directory %drive%:\AKI_Data_Feeds
mkdir %drive%:\AKI_Data_Feeds
for /f %%a in (companyList.txt) do (
echo Creating Directory %drive%:\AKI_Data_Feeds\%%a
mkdir %drive%:\AKI_Data_Feeds\%%a
for /f %%b in (branch1.txt) do (
echo Creating Directory %drive%:\AKI_Data_Feeds\%%a\%%b
mkdir %drive%:\AKI_Data_Feeds\%%a\%%b
if "%_count%"=="1" (
for /f %%c in (branch1_1.txt) do (
echo Creating Directory %drive%:\AKI_Data_Feeds\%%a\%%b\%%c
mkdir %drive%:\AKI_Data_Feeds\%%a\%%b\%%c
for /f %%e in (branch2.txt) do (
echo Creating Directory %drive%:\AKI_Data_Feeds\%%a\%%b\%%c\%%e
mkdir %drive%:\AKI_Data_Feeds\%%a\%%b\%%c\%%e
)
)
SET /a _count +=1
echo %_count%
)
if "%_count%"=="2" (
for /f %%d in (branch1_2.txt) do (
echo Creating Directory %drive%:\AKI_Data_Feeds\%%a\%%b\%%d
mkdir %drive%:\AKI_Data_Feeds\%%a\%%b\%%d
for /f %%e in (branch2.txt) do (
echo Creating Directory %drive%:\AKI_Data_Feeds\%%a\%%b\%%c\%%e
mkdir %drive%:\AKI_Data_Feeds\%%a\%%b\%%c\%%e
)
)
SET /a _count +=1
)
)
)
echo Successfully created.
pause
_count是沒有得到增加批量變量不遞增!
'command.com' /'cmd'是什麼? – 2011-05-23 13:20:11
我正在運行在.bat文件 – 2011-05-23 13:21:01
...在MS-DOS 3.3,Windows XP,Windows 98,FreeDos ..上? – 2011-05-23 13:22:32