The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
How do I execute a system command such "cd" or change directory in Visual C#.NET application? I have a button which when clicked invokes the explorer.exe and shows the directory from My Computer. However, I just need to show the user the files on the CDROM drive.
Thanks
Mukesh
CBClay Burch Syncfusion Team May 16, 2002 10:20 AM UTC
You can launch explorer.exe using the Process class and set StartInfo.Arguments to start it up in a different folder.
private void button1_Click(object sender, System.EventArgs e)
{
System.Diagnostics.Process proc = new System.Diagnostics.Process();
proc.StartInfo.FileName = @"explorer.exe";
proc.StartInfo.Arguments = @"D:\";
proc.Start();
}
CBClay Burch Syncfusion Team May 16, 2002 10:28 AM UTC
I am not sure this is what you want to do in your case, but to execute a DOS command, you can use code such as
System.Diagnostics.Process proc = new System.Diagnostics.Process();
proc.StartInfo.FileName = @"cmd.exe";
proc.StartInfo.Arguments = @"/c cd A:\";
proc.Start();