diff --git a/TwitchDownloaderWPF/PageQueue.xaml.cs b/TwitchDownloaderWPF/PageQueue.xaml.cs index 473bffe1..31e52ceb 100644 --- a/TwitchDownloaderWPF/PageQueue.xaml.cs +++ b/TwitchDownloaderWPF/PageQueue.xaml.cs @@ -1,4 +1,5 @@ -using System.Collections.ObjectModel; +using System; +using System.Collections.ObjectModel; using System.ComponentModel; using System.Threading; using System.Windows; @@ -313,7 +314,17 @@ private void MenuItemOpenTaskFolder_Click(object sender, RoutedEventArgs e) return; } - Process.Start(new ProcessStartInfo(outputFolder) { UseShellExecute = true }); + var args = File.Exists(task.OutputFile) + ? $"/select,\"{task.OutputFile}\"" + : $"\"{outputFolder}\""; + + Process.Start(new ProcessStartInfo + { + FileName = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Windows), "explorer.exe"), + Arguments = args, + UseShellExecute = true, + WorkingDirectory = outputFolder + }); } } }