API Documentation > CorelDRAW > 2025-v26 > CorelScriptTools > ICorelScriptTools
CorelScriptTools.RmFolder method
Removes Folder
Syntax:
Function RmFolder(ByVal Folder As String) As Boolean
Parameters:
Name Type Description
Folder
String
Remarks:
The RmFolder method removes an existing folder. The folder must be empty before it can be deleted. You can also use RmFolder as a function: it returns True (-1) if the folder was removed, False (0) if it was not.
Examples:
The following VBA example removes the Work folder from the Temp folder.
RMFOLDER "C:\TEMP\WORK"
The following VBA example removes the Work folder from the Temp folder and assigns -1 to success.
success% = RMFOLDER "C:\TEMP\WORK"