"For developers", "Server scripts", "Functions description", "Files", "FileExists".
Function to check if the file exists by the specific path.
function FileExists(sFileName: string): boolean;
Parameter |
Type |
Value |
---|---|---|
sFileName |
string |
file name and full path. |
True, if the file exists, false — if such file not found.
begin
if FileExists('c:\swapfile.sys') then mLogScript('Windows swap file is located on the drive C:', '')
else mLogScript('Windows swap file is not found on the drive C:', '');
end.
[14:40:45] (Log "FileExists"): Windows swap file is located on the drive C:
[14:40:45] (Run "FileExists"): Script operation time: 5 ms
[14:40:45] (Run "FileExists"): Script done successfully.