Introduction
Hello, Stackoverflow. I have a question regarding Visual Basic Studio, I just picked it up - just to code something quite specific.
I'm having a problem with the OpenFileDialog.Filter
Code
using (OpenFileDialog ofd = new OpenFileDialog() { Filter = "RWS Save Files (*.rws)|*.rws", ValidateNames = true, Multiselect = false, Title = "RWS File Locator" })
Yes, the file extension is .rws
Problem
The problem lies in the Filter = section, I don't know to create a filter which would exclude a filename starting with Autosave-. Also, the Autosave filename is automatically enumerated, which means that there are multiple files, enumerated as
- Autosave-1.rws, Autosave-2.rws, Autosave-3.rws, Autosave-4.rws
Closest I came to was Filter = "RWS Save Files (*.rws)|Autosave-*.rws
which only displays files starting with Autosave- and since I was unable to find anything on the official msdn.microsoft.com websites regarding Filter filename exclussion - I turn to stackoverflow.