- Handling errors
- Operating mode in Windows Vista (and later)
fDelete (Function) In french: fSupprime Deletes a file accessible from the current computer.
Syntax
<Result> = fDelete(<File name> [, <Option>])
<Result>: Boolean - True if the file was deleted,
- False otherwise. To get more details on the error, use ErrorInfo with the errMessage constant.
<File name>: Character string Name of the file to delete. This parameter can be: - a file name. This file will be automatically sought in the current directory (returned by fCurrentDir).
- a file name with its full or relative path. A UNC path can be used.
Wildcard characters (*,?) are allowed in the file name. If no drive is specified, the file will be deleted from the current drive.
<Option>: Optional constant Type of deletion to perform: | | frReadOnly | Automatically deletes the read-only files (without confirmation). | frToRecycleBin | Sends the file to the Windows recycle bin instead of deleting it. |
Remarks Handling errors fDelete throws an error in the following cases: - the file to delete does not exist,
- the file to delete is open or locked,
- the user has no read or write rights on the file to delete.
This page is also available for…
|
|
|
|