advr.hlp (Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
CHDIR, MKDIR, RMDIR, FILES Statements Details
  Summary  Details  Example                Contents  Index  Back
──────────────────────────────────────────────────────────────────────────────
 CHDIR pathname$
 MKDIR pathname$
 RMDIR pathname$
 FILES [filespec$]
 
 Usage Notes (CHDIR, MKDIR, RMDIR)
   ■ The CHDIR, MKDIR, and RMDIR statements work like their MS-DOS
     counterparts; however, they cannot be shortened to the abbreviated
     versions CD, MD, and RD.
 
   ■ CHDIR changes the default directory but not the default drive. For
     example, if the default drive is C, the following statement changes
     the default directory on drive D, but C remains the default drive:
 
         CHDIR "D:\TMP"
 
   ■ Use CURDIR$ to return the current directory and CHDRIVE to change the
     default drive. See: CURDIR$ Function  CHDRIVE Statement
 
   ■ You can use MKDIR to create a MS-DOS directory with a name that contains
     an embedded space. However, although you can access that directory
     through MS-DOS, you can remove it only with the Visual Basic RMDIR
     statement.
 
   ■ The directory to be removed must be empty except for the working
     directory ('.') and the parent directory ('..'). Otherwise, Visual Basic
     generates one of the following errors:
     • "Path not found"
     • "Path/File access error"
 
 Usage Notes (FILES)
   ■ You can use the MS-DOS wildcard characters, the question mark (?) or
     asterisk (*). A question mark matches any single character in the
     file name or extension. An asterisk matches one or more characters
     starting at that position.
 
   ■ Output from the FILES statement cannot be directed to a form; this
     statement always prints to the background screen. Any reference to
     FILES when forms are showing causes Visual Basic to generate an error.
     Use the HIDE method to hide any visible forms or controls before
     executing this statement. See: HIDE Method