AMRemoveDir Method

Action2 Example

 

Encapsulates the AutoMate™ action in the “File I/O” group, “Remove a directory.” The method attempts to remove the specified directory.

 

Declaration

function AMRemoveDir (varDirectory As Variant) As Integer

 

Parameters

varDirectory

 The name of the directory to be removed (including path, if necessary)

 

Description

The AMMakeDir method attempts to remove the directory specified by varDirectory.

 

If the directory is successfully removed, AMRemoveDir returns “0.” If an error occurs, AMRemoveDir returns “1.” In this case, use the GetLastError property to retrieve the error message AutoMate™ generated when creating the directory.

 

The directory to be removed must be empty before calling AMRemoveDir.