Valid on NetWare, Symbian OS, UNIX, Windows and Windows CE
The RemoveDirectory or RmDir function removes the directory specified by pathstring.
Note: The specified directory must not be write-protected.
Function format:
RemoveDirectory(pathstring as String) as Boolean
RemoveDir(pathstring as String) as Boolean
Identifies the directory that is to be removed. The specified directory:
On successful completion, the function returns TRUE, otherwise returns FALSE.
Example:
'Create dir
CreateDirectory("C:\AMTest")
'Set active dir
SetDirectory("C:\AMTest")
MessageBox(" Current Directory is : " + GetDirectory(0) )
'Set Default to C:\
SetDirectory("C:\")
'Rename the directory
RenameDirectory("C:\AMTest","C:\AMTest_1")
If ExistDirectory("C:\AMTest_1") THEN
RemoveDirectory("C:\AMTest_1")
Else
MessageBox("Could not find directory : C:\AMTest_1")
Endif
|
Copyright © 2014 CA Technologies.
All rights reserved.
|
|