Esempio n. 1
0
        public static bool LocateFileInExplorer(string filePath)
        {
            if (!File.Exists(filePath))
            {
                return(false);
            }

            // Clean up file path so it can be navigated OK
            filePath = Path.GetFullPath(filePath);
            try
            {
                ProcessHelpers.StartProcessAsync("explorer.exe", string.Format("/select,\"{0}\"", filePath));
            }
            catch (Exception ex)
            {
                Debug.WriteLine(ex.Message);
                return(false);
            }

            return(true);
        }