Regular expression for filtering files in OpenFileDialog

I would like to know how to filter files in an open file dialog (in winforms) based on a regular expression. Files have all the same extensions (.xml). Large files are divided into several files with the same name, which should be divided _1 ... We want to show files without _1 (first data file)

there is a property filter in the open file dialog, but I don’t know how to specify this in our file name format, therefore, a regular expression.

Thankx, Niki

+3
source share
5 answers

I don’t think you can do this with the OpenFileDialog Filter property, which simply filters the list of files based on the extension.

, xml, , _1. FileOK . . , .. .

+3

OpenFileDialogEx, CodeProject, OpenFileDialog. , , . , OFDEx , ..

- , CDN_INCLUDEITEM , , . , , . CDN_INCLUDEITEM , .

MSDN Mag,

OFN_ENABLEINCLUDENOTIFY, Windows CDN_INCLUDEITEM . FALSE, Windows . Windows , .. , : " , SFGAO_FILESYSTEM SFGAO_FILESYSANCESTOR, , CDN_INCLUDEITEM." -, Redmondtonians CDN_INCLUDEITEM , .

, CDN_INCLUDEITEM FALSE , . , , CDN_INCLUDEITEM . , CDN_INCLUDEITEM , , Vista.

, ? , , ++; CDN_FOLDERCHANGED CListCtrl, . , #.

+3

OpenFileDialog . , FileView, , , , .

+1

: * _1.xml

0
-1

Source: https://habr.com/ru/post/1697667/


All Articles