How to collect all files in a Folder and its Subfolders that match a string

后端 未结 6 1032
野性不改
野性不改 2020-12-16 12:05

In C# how can I search through a Folder and its Subfolders to find files that match a string value. My string value could be \"ABC123\" and a matching file might be ABC123_

6条回答
  •  天命终不由人
    2020-12-16 13:07

    Adding to SLaks answer, in order to use the Directory.GetFiles method, be sure to use the System.IO namespace.

提交回复
热议问题