Check if a file or folder exists
1 January 2000 by Snakefoot | Comment » | Trackback OffIt can be useful in batch files to know whether a file or folder exists. One can use files as semaphores and for inter proces communication (IPC).
To check if a file exists:
To check if a file exists:
To check if a directory exists (Notice nul):IF EXIST c:\windows\win.com ECHO File exists!
IF EXIST c:\windows\nul ECHO Directory exists!
Updated: 2 July 2007