DirectoryExists
PowerScript function
Description
Determines if the named directory exists.
Syntax
1 |
DirectoryExists ( directoryname ) |
Argument |
Description |
---|---|
directoryname |
String for the name of the directory you want to |
Return value
Returns true if the directory exists. Returns false if the directory
does not exist or if you pass a file name in the directoryname
argument.
Usage
You can use this method before attempting to move a file or delete a
directory using other file system methods.
Examples
This example determines if a directory exists before attempting to
move a file to it; otherwise it displays a message box indicating that the
path does not exist:
1 2 3 4 5 6 7 8 9 10 |
string ls_path="monthly targets" If DirectoryExists ( ls_path ) Then FileMove ("2000may.csv", ls_path+"may.csv" ) MessageBox ("File Mgr", "File moved to "& + ls_path + ".") Else MessageBox ("File Mgr", "Directory " + ls_path+& " does not exist" ) End If |
See also
Document get from Powerbuilder help
Thank you for watching.
Subscribe
Login
0 Comments
Oldest