C# Windows: open file in explorer (selected)

Date: 2019-10-25
// using System.Diagnostics;
try
{
	string args = string.Format("/e, /select, \"{0}\"", fileName);
	ProcessStartInfo info = new ProcessStartInfo();
	info.FileName = "explorer";
	info.Arguments = args;
	Process.Start(info);
}
catch (Exception ex)
{
	Log.Write(LogLevel.Warning, $"Error opening folder of file: {fileName})", ex);
}
27240cookie-checkC# Windows: open file in explorer (selected)