OS-DELETE statement
Executes an operating system file or directory delete from within ABL. Can delete one or more files, a directory, or an entire directory branch.
Syntax
filename
VALUE (expression
)RECURSIVEExampleThis procedure opens a dialog box that prompts the user to choose a file to delete, then uses the OS-DELETE statement to delete the file:
Notes
- The filenames and directory names must conform to the naming conventions of the underlying operating system.
- If OS-DELETE encounters files or directories that are protected against deletes, it skips over them, generates an error code, but continues to delete any unprotected files and subdirectories that are specified. If several such files or directories are encountered, OS-ERROR returns information on the last error only. If a subdirectory cannot be deleted, then the named directory is not deleted.
- You cannot use wildcard characters to specify files or directories.
- Although an error can occur during execution of this statement, the statement does not generate an error message, raise an error condition, or affect the program’s flow in any way. Check for an execution error by using the OS-ERROR function and evaluating the return.
See also
OpenEdge Release 10.2B
|