Я работаю над небольшим скриптом для создания большого количества папок, он попадает в секцию вычислений (да, я знаю, что это неэффективно, но я не могу заставить работать FOR * l oop), но это не ничего не делай после этого. Я понятия не имею, почему он это делает, он не дает мне достаточно информации. Я знаю, что он добирается до секции «Расчет», но после этого просто завершает программу. Может быть, я могу исправить ЗА Л oop, если решить это?
@echo off
:Var
cls
set created=0
:select
Echo How many folders will there be?(1-100)
set /p Count=
if %Count% LSS 1 GOTO Var
if %Count% GTR 100 GOTO Var
:2sel
cls
Echo There will be %Count% folders!
Echo.
Echo How many layers deep will this go?(1-10)
set /p Layers=
if %Layers% LSS 1 GOTO 2sel
if %Layers% GTR 10 GOTO 2sel
cls
Echo There will be %Layers% Layers and %Count% Folders.
Echo.
Echo Are you sure? 1)Yes 2)No
set /p choi=
if %choi% EQU 1 GOTO Calculate
GOTO Var
:Calculate
pause
cls
if %Layers% EQU 1(
set dis= %Count%
GOTO say
)
if %Layers% EQU 2(
set dis= %Count% * %Count%
GOTO say
)
if %Layers% EQU 3(
set dis= %Count% * %Count% * %Count%
GOTO say
)
if %Layers% EQU 4(
set dis= %Count% * %Count% * %Count% * %Count%
GOTO say
)
if %Layers% EQU 5(
set dis= %Count% * %Count% * %Count% * %Count% * %Count%
GOTO say
)
if %Layers% EQU 6(
set dis= %Count% * %Count% * %Count% * %Count% * %Count% * %Count%
GOTO say
)
if %Layers% EQU 7(
set dis= %Count% * %Count% * %Count% * %Count% * %Count% * %Count% * %Count%
GOTO say
)
if %Layers% EQU 8(
set dis= %Count% * %Count% * %Count% * %Count% * %Count% * %Count% * %Count% * %Count%
GOTO say
)
if %Layers% EQU 9(
set dis= %Count% * %Count% * %Count% * %Count% * %Count% * %Count% * %Count% * %Count% * %Count%
GOTO say
)
if %Layers% EQU 10(
set dis= %Count%*%Count%*%Count%*%Count%*%Count%*%Count%*%Count%*%Count%*%Count%*%Count%
GOTO say
)
:say
Echo You are about to make %dis% files.
Echo Are you sure? 1)Yes 2)No
pause>NUL
set /p choi2=
if %choi% EQU 2 GOTO Var
)
cls
Echo %made% / %dis%
pause
:one
:two
:three
:four
:five
:six
:seven
:eight
:nine
:ten