|I'm trying to determine in a directory exist using a batch file in XP.|
Microsoft basically says use NUL after the pathname
The syntax for checking for a directory existance is...
if exist c:\windows\nul then goto exists
I want to test for the existence of a folder with spaces in the name. The obvious solution is to enclose the name inside double quotes. I can't seem to get that to work either.
Here's an example of what I'm trying:
if exist "C:\Documents and Settings\NUL" goto YES
echo The file does not exist
echo The file exists
I have tried using spaces and quote marks in various combinations. I cannot find a way to test for the existence of a directory with spaces in it. Can you help?