| Home | All functions | Categories |
vuFileExists(*CSTRING), LONG
Checks whether a specified file exists on disk.
| Parameter | Data Type | Description |
|---|---|---|
| pFile | CSTRING(260) | Full path of the file to check (for example, C:\Windows\Notepad.exe). |
Note: In vuFileTools V5, CSTRINGs are not limited to the size shown above. The number is for example only.
TestPath CSTRING(260)
Result LONG
CODE
TestPath = 'C:\Windows\Notepad.exe'
Result = vuFileExists(TestPath)
IF Result
MESSAGE('The file EXISTS: ' & TestPath, 'vuFileExists')
ELSE
MESSAGE('The file does NOT exist: ' & TestPath, 'vuFileExists')
END
TestPath = 'C:\Windows\NotNotepad.exe'
Result = vuFileExists(TestPath)
IF Result
MESSAGE('The file EXISTS: ' & TestPath, 'vuFileExists')
ELSE
MESSAGE('The file does NOT exist: ' & TestPath, 'vuFileExists')
END
Notes
Use vuFileExistsEx if you need to wait or poll for the file to appear.
Works with local and network paths.
| Home | All functions | Categories |