UBot Studio 4.0: The Folder Exists and File Exists Functions
Posted by Miriam M-B on 29 October 2012 07:35 PM

The $file exists function returns True is a file path exists.

The function will return False if the file path does not exist.

For example:

 

set(#file exists, $file exists("C:\\Users\\LillyT\\Documents\\myfile.txt"), "Global")

 

If the file exists, the variable "#file exists" will return "true". To test the function, simply replace the file path with a file in your folder that exists. 

If the file does not exist, then the variable "#file exists" returns "false". To test the function, simply replace the file path with a file in your folder that does not exist. 

 

The $folder exists function returns True is a folder exists.

The function will return false if the folder does not exist.

 

For example:

set(#folder exists, $folder exists("C:\\Users\\LillyT\\Documents\\Random Files"), "Global")

 

If the folder exists, the variable "#folder exists" will return "true". To test the function, simply replace the file path with a folder that exists. 

If the folder does not exist, then the variable "#folder exists" returns "false". To test the function, simply replace the file path with folder that does not exist. 

 

 


Comments (0)
Help Desk Software by Kayako Resolve