File Exists
File Exists
Section titled “File Exists”Type: file-exists · Package: Filesystem Activities v1.0.0 · Output: boolean
Checks if a file exists at the given path and returns true or false. It is the safe way to anticipate errors: verify that a file is there before reading it, or wait for it to appear before processing it.
How it works
Section titled “How it works”Returns true if there is a file in path, false if not. It does not throw an error if the file does not exist — that is what it is for. The result typically feeds an If.
Required parameters
Section titled “Required parameters”| Parameter | Editor | Description |
|---|---|---|
path | expression | Path of the file to check. |
Optional parameters
Section titled “Optional parameters”Ninguno.
Output
Section titled “Output”Returns a boolean: true if the file exists.
Example
Section titled “Example”Read a file only if it is present; If not, use a default value:
File Exists path = = "C:/config/parametros.txt" → output: existeIf condition = = existe ├─ then: │ Read File path = "C:/config/parametros.txt" → output: config └─ else: Log level = warning message = "No hay archivo de parámetros; se usan valores by default"Related activities
Section titled “Related activities”- Read File — read the file once it is confirmed to exist.
- List Files — check/list multiple files in a folder.
- If — branch based on the result.