Bookshelf Home | Contents | Index | Search | PDF |
Siebel VB Language Reference > Siebel VB Language Reference >
ChDir Statement
This standard VB statement changes the default folder for the specified drive.
Syntax
ChDir [drive][[\]folder\]folder
Returns
Not applicable
Usage
If the drive argument is omitted, ChDir changes the default folder on the current drive. If the initial backslash in [\]folder\ is omitted, ChDir changes to a folder within the current folder. If it is included, the path is followed from the root folder.
The ChDir statement does not change the default drive. To change the default drive, use ChDrive.
Example
This example changes the current folder to
C:\Windows
, if it is not already the default.Sub Button_Click
Dim newdir as String
newdir = "c:\Windows"
If CurDir <> newdir then
ChDir newdir
End If
End SubSee Also
ChDrive Statement
CurDir Function
Dir Function
MkDir Statement
RmDir Statement
Bookshelf Home | Contents | Index | Search | PDF |
Siebel VB Language Reference Published: 18 June 2003 |