You can use the IF EXIST statement to check for the presence of a directory. ... Testing If a Drive or Directory Exists from a Batch File ...
Table M-1. Batch file keywords / variables / operators, and their shell equivalents ... IF, if, if-test. IF EXIST FILENAME, if [ -e filename ], test if file exists ... FIND, grep, find strings in files. MD, mkdir, make directory ...
20 Nov 2006 ... That allows you to call the batch file from any directory and return to the original directory when ... Check if a file or folder exists ...
probe-file returns nil if a file does not exist. directory returns nil if ..... The only sure method to check if file can be read is to try to open it. ...