遵循我的批处理文件中的代码:
@echo off
:Test
set A=empty
set /p A= Path:
if %A%==empty (
echo "You have not entered any Path"
echo.
goto Test
) else if not exist "%A%" (
echo "Provided path not exist"
echo.
goto Test
) else (
goto Exist
)
:Exist
echo Path Exist
pause
当输入路径为:
D:\Installed_Softwares\Test Folder\CXR22
批次自动关闭。
感谢您的帮助。