Appendix: Built-in Scripting Language Examples DirDelete Deletes the specified directory. Syntax DirDelete( strDirectory , optBooEmptyOnly ) strDirectory The name and file path of the directory to delete. Tip: This parameter supports wildcards ( * and ? ). optBooEmptyOnly Optional flag. If this parameter has a value of 1, then the directory is deleted only if it is empty. By default — that is, if the parameter is omitted or has a value of 0 — the directory is deleted whether it is empty or not. Returned value Examples DirLength Returns the size of a specific directory. Description Returns the size of a specific directory.
Syntax DirLength( strPath ) strPath Page 522 InduSoft Web Studio 1 Directory created successfully. Tag Name Expression Tag DirCreate("C:\Studio\Temp") // The Temp folder is created in the C:\Studio path (only if the C:\Studio path already exists). Tag DirCreate("C:\Studio\Temp",1) // The C:\Studio\Temp full path is created. Function Group Execution Windows Embedded Thin Client DirDelete File Synchronous Supported Supported Executed on Server Value Description #2 Attempted to delete a non-empty directory when this action is not allowed (i.e., optBooEmptyOnly does not equal 0). #1 Invalid parameters. 0 Failed to delete the directory (i.e., directory does not exist).
1 Directory deleted successfully. Tag Name Expression Tag DirDelete( "C:\Studio\Temp" ) // The Temp folder from C:\Studio is deleted. Tag DirDelete( "C:\Studio\Temp", 1 ) // The Temp folder from C:\Studio is deleted only if it is empty. Function Group Execution Windows Embedded Thin Client DirLength File Synchronous Supported Supported Executed on Server