C5_DIRREMOVE

 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()

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.