How can I delete multiple files from a directory specified by a multi-selected listbox in C# WPF? : <p>I have a directory that contains multiple text files.  The name of each text file is also the same as the first line in the text file, which is the same name that it used to populate the text content of each listbox item.
  ex. I have files "a", "b", and "c".  My list box will contain the items "a", "b", and "c".  I have my list box set to an extended selection so the user can select multiple files.  I want the user the be able to delete selected files.
This is my current broken code:</p>

<pre><code>private void btnDeleteSelection_Click(object sender, RoutedEventArgs e)
        {
            var selectedFiles = lstSavedSites.SelectedItems;
            string selectedFile;
            try
            {
                foreach (var file in selectedFiles)
                {
                    selectedFile = lstSavedSites.SelectedItem.ToString();
                    File.Delete("@C:/myFolderName/anotherFolderName/" + selectedFile);
                }
                PopulateListBox();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
</code></pre>

<p>The ex.Message says "The given path's format is not supported."</p>
