18.01.2015 Views

Technical Reference Manual - InduSoft

Technical Reference Manual - InduSoft

Technical Reference Manual - InduSoft

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Appendix: Built-in Scripting Language<br />

Optional flag. If omitted or if this parameter has the value 0, the directory is created only if all<br />

previous directories exist. If this parameter has the value different from 0, the full path specified<br />

in the strDirectory parameter is created.<br />

Returned value<br />

-1 Invalid parameters<br />

0 Failed to create the directory (e.g., Drive does not exist.)<br />

1 Directory created successfully.<br />

Examples<br />

Tag Name<br />

Tag<br />

Tag<br />

Expression<br />

DirCreate("C:\Studio\Temp") // The Temp folder is created in the C:\Studio path (only if the C:\Studio path<br />

already exists).<br />

DirCreate("C:\Studio\Temp",1) // The C:\Studio\Temp full path is created.<br />

DirDelete<br />

Deletes the specified directory.<br />

Function Group Execution Windows Embedded Thin Client<br />

DirDelete File Synchronous Supported Supported Executed on Server<br />

Syntax<br />

DirDelete( strDirectory, optBooEmptyOnly )<br />

strDirectory<br />

The name and file path of the directory to delete.<br />

Tip: This parameter supports wildcards ( * and ).<br />

optBooEmptyOnly<br />

Optional flag. If this parameter has a value of 1, then the directory is deleted only if it is empty.<br />

By default — that is, if the parameter is omitted or has a value of 0 — the directory is deleted<br />

whether it is empty or not.<br />

Returned value<br />

Value<br />

Description<br />

−2 Attempted to delete a non-empty directory when this action is not allowed (i.e., optBooEmptyOnly does not equal 0).<br />

−1<br />

Invalid parameters.<br />

0 Failed to delete the directory (i.e., directory does not exist).<br />

1 Directory deleted successfully.<br />

Examples<br />

Tag Name<br />

Tag<br />

Expression<br />

DirDelete( "C:\Studio\Temp" ) // The Temp folder from C:\Studio is deleted.<br />

<strong>InduSoft</strong> Web Studio Page 627

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!