MkDir Statement

Named Arguments

No

Syntax

MkDir path


path

Use: Required

Data Type: String

The name of the folder to be created.

Description

Creates a new folder.

Rules at a Glance

  • If you omit the drive from path, a new folder is created on the current drive.

  • You can specify the drive using either its local drive letter or its UNC name.

Programming Tips and Gotchas

  • If your program is running on Windows NT, ensure that the logged-in user has the rights to create a folder on the specified drive prior to calling the MkDir statement.

  • VB doesn't make the new folder the current folder automatically after a call to MkDir. You need to call the ChDir statement to do this.

  • To remove a folder, use the RmDir statement.

  • Use CurDir to determine the current drive.

  • VB6 includes a new File System object model that has a Folders collection object and Folder object. You will find these objects much more flexible and easier to use than the intrinsic VB folder-management functions.

See Also

ChDir Statement, CurDir Function, File System Objects, RmDir Statement
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset