If IsFile()

IF IsFile([path]file name) checks for the existence of a file within a specific directory on the user's system. If the file is found, ISFILE() is assigned the value of true, if the file is not found, then the function is assigned the value of false. The file name parameter is the file to be searched for and the optional path parameter is used to specify a specific drive and directory. You can use variables as the path parameter (for example, $WINDIR$, $SYSTEM$, $SOURCEDIR$, $LOCATEDIR$, and so on).

For example:

IF ISFILE("$WINDIR$\myprog.ini")

RENAME: "$windir$\myprog.ini" "$windir$\myprog.inx"


An existing file, Myprog.ini, is renamed to Myprog.inx, if it exists in the Windows directory on the user's system. You can also use this function to determine if a directory exists by using a \ after the directory name, ISFILE(c:\xyz\), for example.