pdf IsDir DOS function
Par keyphrene, Thursday 15 July 2010 à 06:47 :: Shell Windows :: #33 :: rss
Detect if your pathname is a directory. (Tutorial DOS function)
Detect if your pathname is a directory
set A="D:\path\to\name" call:IsDir %A% IF %ERRORLEVEL% == 0 ( echo "Directory found" ) ELSE ( echo "Directory not found" ) :IsDir FOR /F "delims=" %%i IN ("%~1") DO SET MYPATH="%%~fi" PUSHD %MYPATH% 2>NUL IF ERRORLEVEL 0 ( POPD ) GOTO:EOF
TAGS : Tutorial DOS function Is Directory IsDir ERRORLEVEL FOR PUSHD POPD

Comments
No comment for this moment.
Add a comment