Answers for "open file in explorer c#"

C#
3

c# how to open file explorer

Process.Start("explorer.exe" , @"C:\Users");
Posted by: Guest on May-31-2020
0

open file in explorer c#

// required in addition to other 'using necessary
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));
    }
}
Posted by: Guest on June-14-2020

Code answers related to "open file in explorer c#"

C# Answers by Framework

Browse Popular Code Answers by Language