FDELETE Function: Windows

Deletes an external file or an empty directory.

Category: External Files
See: FDELETE Function in SAS Functions and CALL Routines: Reference



Required Argument


specifies the fileref that is assigned to the external file or directory. Note that the fileref cannot be associated with a list of concatenated filenames or directories. If the fileref is associated with a directory, the directory must be empty. You must have permission to delete a file. If the function is used within a DATA step, the fileref must be enclosed in quotation marks. If the function is used in a macro, the fileref must not be enclosed in quotation marks.


FDELETE returns 0 if the operation was successful, and a nonzero number if it was not successful.