[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 DIRREMOVE()
 Remove a directory
------------------------------------------------------------------------------
 Syntax

     DIRREMOVE(<cDirName>) --> nSuccess

 Arguments

     <cDirName> is the name of the directory to erase, including an
     optional drive.  If you do not specify a drive, the current one is used.

 Returns

     DIRREMOVE() returns 0 if successful; -1 if there is an argument error.
     Otherwise, DIRREMOVE returns the DOS error code.

 Description

     DIRREMOVE() removes a specified directory.  Note that you must first
     have sufficient rights to delete a directory.  A directory must be empty
     in order to be deleted.  Therefore, to delete a directory that contains
     subdirectories, you must first delete the subdirectories (see example
     below).

 Examples

     .  This example uses DIRREMOVE() to delete a subdirectory named
        C:\TEST\ONE, which only contains an empty subdirectory named
        C:\TEST\ONE\TWO:

        DIRREMOVE("c:\test\one\two")        // First delete lowest dir
        nResult := DIRREMOVE("c:\test\one")  // Then delete higher dir
        IF nResult != 0
           ? "Cannot remove directory, DOS error ", siResult
           BREAK
        ENDIF


 Files   Library is EXTEND.LIB.


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