Skip to content

Remove_Directory

See Also: File_Exist, Get_Directory, Make_Directory, Make_Temp_File, Valid_Drive

Purpose

To delete a disk folder.

Syntax

Remove_Directory {folder}

What It Does

The Remove_Directory command deletes the folder specified in the {folder} argument.

Example

Remove_Directory "k:\accounting\data"

In this example, the data subfolder will be removed from the k:\accounting folder.

Notes

  • If the folder cannot be removed for any reason (e.g., there are files in the folder, or the folder attributes are set to read-only), error 4358 DFERR_RAWFILE_ERROR is triggered.

  • Remove_Directory will fail if the current folder is the same as the folder you want to remove.

  • Remove_Directory may fail when the folder is in use by another application.