DeleteDirectory()

Syntax

Result = DeleteDirectory(Directory$, Pattern$ [, Mode])
Description
Deletes the specified Directory$ or files in that Directory$ matching the provided pattern.

Parameters

Directory$ The directory to delete.
Pattern$ A pattern for deleting files within the directory. For example: "*.*" will delete any files in the directory. "*.exe" will delete only the .exe files. By default, a null Pattern$ ("") will delete all the files.
Mode (optional) Options for the delete operation. It can be a combination of the following values:
  #PB_FileSystem_Recursive: Deletes the directory with all subdirectories.
  #PB_FileSystem_Force    : Deletes even the files which are protected (read-only).

Return value

Returns nonzero if the operation was successful or zero if it failed.

See Also

CreateDirectory(), ExamineDirectory(), CopyDirectory()

Supported OS

All

<- CreateDirectory() - FileSystem Index - DeleteFile() ->