1

how can I define SaveFileDialog.Filter to load files only with an extension ,ex: file1.xml file3.txt file3

file3 will Drop

I accidentally try that "all file|.?" and succeed but still now can't figure out the syntax. Any way, How can I add to this filter a black list of executable file, for say .bat .exe

azulay7
  • 305
  • 3
  • 16

1 Answers1

1

Unfortunately it's impossible to use regular expressions in SaveFileDialog. But you can try to set "Files with extension|*.?*" to the Filter property. Looks like it works.

Teddy Bo
  • 679
  • 8
  • 19
  • Yeah you right. I accidentally try that and succeed but still now can't figure out the syntax "*.?*" . Any way, how can i add to this filter a black list of executable file, for say .bat .exe – azulay7 Jun 07 '13 at 16:53
  • `"?"` - means "some symbol". For example if you write `*.???` then only files with extension length equal to 3 like ".bat" or ".txt" will be shown and for example ".cs" will be hidden. – Teddy Bo Jun 07 '13 at 17:33