# Test If File Exists

This function is used to test if an item exists at a supplied path. You can test if the item is a file, a folder or either. If there is an item at the supplied path and it meets the specified criteria, the result of the test will true. Otherwise the result will be false false.

The results of the test can be Set, Anded or Ored to the action test state. The test is not performed if it is unnecessary due to the current value of the test state. For example You are Anding to the test state and it is currently false.

The supplied text may contain any of the escape sequences described in Escape Sequences.

Note that at runtime after processing escape sequences, the path does not start with / or ~/, the test state will be set to false.

The function is only executed once per set of files while executing stepwise.

When the function succeeds (the test state is true), the following named variables will have been populated:

Test if File Exists Creation Date
  The creation date of the file or folder. If the information cannot be extracted, the named variable will be empty.
Test if File Exists Modification Date
  The modification date of the file or folder. If the information cannot be extracted, the named variable will be empty.
Test if File Exists File Size
  The size of the file or folder. If the information cannot be extracted, the named variable will be empty. Note that the file size returned for folders is typically a meaningless number.
Test if File Exists is Folder
  Set to 1 if the item is a folder, otherwise 0.
Test if File Exists is Hidden
  Set to 1 if the item is hidden, otherwise 0.

When the function fails, or is not performed, the above named variables will be cleared.