Using the command line shell or batch files (.bat), you can easily check if a single file exists.

Note the example above does not work with directories or drives! (At least, not on older systems like DOS)

The check would always return false.

Instead, append the important keyword “NUL” to the directory.

This should work in Windows CMD and also in older MS DOS or FreeDOS versions.

Reference

 

  [email protected]