Xbasic

DIR_REMOVE Function

Syntax

N DIR_REMOVE(C directory_name)

Arguments

directory_name

The fully qualified name (which should include the full path and an optional drive specification) of the directory to delete. Before it can be removed, a directory must be empty and cannot contain any sub-directories. Character

Description

Remove a directory.

DIR_REMOVE() removes the directory specified by Directory_Name. Use DIR_REMOVE_RECURSE()if you uncertain if the directory exists.

The directory must exist.

Example 

This statement erases the temporary table ASCII file and then removes the TEMP sub-directory from the A5 directory.

file.remove("c:\a5\temp\custdata.tbl")
dir_remove("c:\a5\temp")

See Also