FOLLOW US
softpcapps Software CODE HELP BLOG

Shareware and Freeware Open Source Windows Software Applications and Free Online Tools

How to open Windows Explorer with a specific File being selected

To open Windows Explorer with a specific file being selected you can use the following function :
	

	private void OpenAndSelectFileInWindowsExplorer(string filepath)
	{ 
		string args = string.Format("/e, /select, \"{0}\"", filepath);
		
		System.Diagnostics.ProcessStartInfo info = new System.Diagnostics.ProcessStartInfo();
		info.FileName = "explorer";
		info.UseShellExecute = true;
		info.Arguments = args;
		System.Diagnostics.Process.Start(info);		
	}