how to open file explorer in c# code example
Example 1: c# how to open file explorer
Process.Start("explorer.exe" , @"C:\Users");
Example 2: open file in explorer c#
using System.Diagnostics;
using System.IO;
private void OpenFolder(string folderPath)
{
if (Directory.Exists(folderPath))
{
ProcessStartInfo startInfo = new ProcessStartInfo
{
Arguments = folderPath,
FileName = "explorer.exe";
};
Process.Start(startInfo);
}
else
{
MessageBox.Show(string.Format("{0} Directory does not exist!", folderPath));
}
}