RemoveDirectory PowerScript function
Description
Removes a
directory.
Syntax
1 |
<span>RemoveDirectory</span> ( <span>directoryname</span> ) |
Argument |
Description |
---|---|
directoryname |
String for the name of the directory |
Return Values
Integer. Returns 1 if the function succeeds
and -1 if an error occurs.
Usage
The directory must be empty and must not be the current directory
for this function to succeed.
Examples
This example removes a subdirectory from the current
directory:
1 |
string ls_path="my targets" |
1 |
integer li_filenum |
1 |
1 |
li_filenum = <span>RemoveDirectory</span> ( ls_path )<br>If li_filename <> 1 then |
1 |
MessageBox("Remove directory failed", & |
1 |
   + "Check that the directory exists, is empty, and " &<br>   + "is not the current directory") |
1 |
else |
1 |
MessageBox("Success", "Directory " + ls_path + & |
1 |
    " deleted") |
1 |
end if |
See Also
Document get from Powerbuilder help
Thank you for watching.
Subscribe
Login
0 Comments
Oldest