|
Siebel VB Language Reference > Methods Reference for Siebel VB > Disk and Directory Control Methods >
Change Directory Method
The Change Directory method changes the default directory of a drive. It does not return a value. It does following depending on how you use the arguments:
- Include the drive argument. It changes the default directory on the current drive.
- Include the first backslash in [\]directory\. It uses the path from the root directory.
- Do not include the first backslash in [\]directory\. It changes to a directory that resides in the current directory.
The Change Directory method does not change the default drive. To change the default drive, you use the Change Drive method. Format
ChDir [drive][[\]directory\]directory
The following table describes the arguments that you can use with this method.
|
|
drive |
The name of the drive that contains the desired default directory. You can use one of the following values:
- A letter
- A string expression that identifies the drive name
A colon is not required. |
[\]directory\ |
The path. You can use one of the following values:
- Path to the directory that this method sets as the default directory.
- A string expression that identifies the path.
You use this argument in the following situations:
- The directory is not in the current directory of the specified drive
- You do not specify a drive and the directory is not in the default drive
|
directory |
The name of the directory that this method sets for the default directory, or a string expression that identifies this name. |
Example
The following example changes the current directory to C:\Windows: Sub Button_Click Dim newdir as String newdir = "c:\Windows" If CurDir <> newdir then ChDir newdir End If End Sub
|