Folder Manager
Enter Folder Name: ""
Enter Full Path/Drive: ""
My problem is, I've search on how to check if the is exist or not, but failed to use the codes.
Can anyone help me with this? Please see my codes below.
My CODE:
Code: Select all
@echo off
:top
cls
echo Folder Manager
set /p "fd= Folder Name: "
if "%fd%" == "" goto fdError
goto next
:next
set /p "path= Full Path/Drive: "
if "%path" == "" goto pathError
goto pathd
:fdError
echo Error Incountered. Please Try Again.
pause > nul
goto top
:pathError
echo You can't leave it blank.
pause > nul
goto top
:pathd
if exist %path% (
%path%
if exist %fd% (
del %fd%
md %fd%
)
goto finish
)
if not exist %path% (
echo Please check the path.
goto top
)
:finish
echo Directory - "%fd%" has been successfully created at "%path%".
pause >nul
Your help would be great help for me. Thank you in advance.