To test if a file exists before attempting to copy a file from the publication directory to a temporary location:
if (FileExists( SYSTEM_PUBLICATION_DIR + "test.txt" )){ CopyFile( SYSTEM_PUBLICATION_DIR + "test.txt", SYSTEM_TEMP_DIR )}