Viva Clipper !

CT_DIRCHANGE

Advertisements
DIRCHANGE()
 Changes the current directory
------------------------------------------------------------------------------
 Syntax

     DIRCHANGE(<cDirectory>) --> nErrorCode

 Argument

     <cDirectory>  Designates the path of the directory that is changed.

 Returns

     DIRCHANGE() returns a 0 when it successfully changes the directory;
     otherwise, an error code is passed.  The codes are defined as follows:

     Table 7-2:  DIRCHANGE() Error Codes
     ------------------------------------------------------------------------
     Code    Symb. constants     Definition
     ------------------------------------------------------------------------
      0      NO_DISK_ERR         No error occurred
     -2      ER_FILE_NOT_FOUND   File not found
     -3      ER_PATH_NOT_FOUND   Path not found
     -5      ER_ACCESS_DENIED    Access denied (e.g., in network)
     ------------------------------------------------------------------------

     DIRCHANGE() changes the current subdirectory or determines if a
     directory exists.  This allows DOS error messages to be intercepted.
     (See also DIRMAKE()).

 Note

     .  <cDirectory> may contain a drive designator and a path.
        Wildcards are not allowed.

 Example

     Change to the "\DATA" directory:

     IF DIRCHANGE("\DATA") == 0
        ? "Current directory is now:  " + DIRNAME()
     ENDIF

See Also: DIRMAKE() DIRNAME() DIRREMOVE()

 

Advertisements

Advertisements