Zoomed Image

AMSX Scripting Language - Command : waitforfileexists

Summary

Wait until a file appears on the file system within a timeout period

Description

Polls the file system until the specified file exists or the timeout elapses. Useful for synchronising with external processes that write a file on completion. Can optionally throw an error if the file does not appear within the timeout.

Parameters

ParameterDescription
cmdFile path to wait for
Argument 0Timeout in seconds to wait before giving up
Argument 1True to throw an error if the file does not appear within the timeout; False to continue silently

Syntax


WaitForFileExists "File path to wait for", "Timeout in seconds to wait before giving up", "True to throw an error if the file does not appear within the timeout; False to continue silently"

Return to the AMSX Command Reference