filmov
tv
Batch Programming: Search and Find Folders

Показать описание
Basic Format ►
set /p Foldername=
for /d %%y in (Search) do (
Action
)
First Example:
@echo off
:start
set /p name=
for /d %%y in (d:\Names\%name%*) do (
goto start
)
2nd Example:
@echo off
:start
cls
echo To enter a patient name press "Y" and if you want to exit the program press "N" and enter.
set /p select=
if %select% == Y (
goto Item_%select%
) else if %select% == N (
goto Item_%select%
) else (
goto start
)
:Item_Y
echo Please enter a patient name first name and last name, and press enter.
set /p name=
for /d %%y in (d:\Names\%name%*) do (
goto start
)
:Item_N
exit
set /p Foldername=
for /d %%y in (Search) do (
Action
)
First Example:
@echo off
:start
set /p name=
for /d %%y in (d:\Names\%name%*) do (
goto start
)
2nd Example:
@echo off
:start
cls
echo To enter a patient name press "Y" and if you want to exit the program press "N" and enter.
set /p select=
if %select% == Y (
goto Item_%select%
) else if %select% == N (
goto Item_%select%
) else (
goto start
)
:Item_Y
echo Please enter a patient name first name and last name, and press enter.
set /p name=
for /d %%y in (d:\Names\%name%*) do (
goto start
)
:Item_N
exit