I am creating a simple explorer program for an assignment on c# and have the directory set to c:\\Windows
How you would be able to change the directory from the default windows to something else in the console.
Directory.SetCurrentDirectory(@"c:\program files\");
You can set Environment.CurrentDirectory
property for your directory path.
Gets or sets the fully qualified path of the current working directory.
public static void Main(string[] args)
{
Environment.CurrentDirectory = "C:\\Windows";
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With