[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 FILEDELETE()
 Deletes file(s) by name and attribute
------------------------------------------------------------------------------
 Syntax

     FILEDELETE(<cFileMask>, [<nFileAttr>]) --> lDeleted

 Arguments

     <cFileMask>  Designates the file or files to delete.

     <nFileAttr>  Designates one of the following file attributes.  The
     default value is 32.

     Table 7-13:  File Attribute Coding
     ------------------------------------------------------------------------
     Value     Symb. constants   Definition
     ------------------------------------------------------------------------
     0         FA_NORMAL
     1         FA_READONLY       Read-only
     2         FA_HIDDEN         HIDDEN (Concealed files)
     4         FA_SYSTEM         SYSTEM (System files)
     8         FA_VOLUME         VOLUME (Name of floppy/hard disk)
     32        FA_ARCHIVE        ARCHIVE (Changed since last backup)
     ------------------------------------------------------------------------

 Returns

     FILEDELETE() returns .T. when at least one or more files are deleted;
     otherwise, .F. is returned.

 Description

     Occasionally, you will need to clean up a floppy or a hard disk or
     delete whole file groups.  This function deletes entire file groups with
     a function call, without using the RUN command.

 Notes

     Warning!  FILEDELETE() can also delete system files.

     .  The default standard attribute is archive (32).  Drive and
        path designations, and wildcards are permitted.

     .  Subdirectories must be deleted with the help of the
        DIRREMOVE() function.

 Example

     Attempt to delete all index files, then display the completion status:

     IF FILEDELETE("*.NDX")
        ? "Files deleted."
     ELSE
        ? "No files found."
     ENDIF


See Also: DELETEFILE()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson