Knowledgebase
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
ERROR: Domain does not match license key file domain (oldsupport.ubotstudio.com), allowed domains: support.ubotstudio.com, please change the product path to match the domain under Admin CP > Settings > General Settings
This Product will not work properly unless untill that value is changed.

For more information please contact the kayako support at https://my.kayako.com