If Exist でパス名の最後に「\」をつける。
- Command Prompt
C:\>type nul > file C:\>mkdir folder C:\>If Exist folder\ (Echo.Folder.) Else (Echo.Not folder.) Folder. C:\>If Exist file\ (Echo.Folder.) Else (Echo.Not folder.) Not folder. C:\>
確認
- Windows XP Professional Service Pack 3