Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
FileSystem.CurrentDirectory Property
Definition
- Namespace:
- Microsoft.VisualBasic.FileIO
- Assembly:
- Microsoft.VisualBasic.Core.dll
- Assembly:
- Microsoft.VisualBasic.dll
- Source:
- FileSystem.vb
- Source:
- FileSystem.vb
- Source:
- FileSystem.vb
- Source:
- FileSystem.vb
- Source:
- FileSystem.vb
Important
Some information relates to prerelease product that may be substantially modified before itβs released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets the current directory.
public:
static property System::String ^ CurrentDirectory { System::String ^ get(); void set(System::String ^ value); };
public static string CurrentDirectory { get; set; }
static member CurrentDirectory : string with get, set
Public Shared Property CurrentDirectory As String
Property Value
The current directory for file I/O operations.
Exceptions
The path is not valid.
The user lacks necessary permissions.
Examples
This example returns the current directory and displays it in a message box.
MsgBox(My.Computer.FileSystem.CurrentDirectory)
This example sets the current directory to C:\TestDirectory.
My.Computer.FileSystem.CurrentDirectory = "C:\TestDirectory"
Remarks
CurrentDirectory is a system-wide environment variable.
Applies to
Feedback
Was this page helpful?
