June 2003
Intermediate to advanced
800 pages
34h 20m
English
You need to process multiple files based on a filter expression (such as *.txt or rec03??.bin).
Use the overloaded version of the DirectoryInfo.GetFiles method that accepts a filter expression.
The DirectoryInfo and Directory objects both provide a way to search the current directories for files that match a specific filter expression. These search expressions can use the standard ? and * wildcards.
For example, the following code snippet retrieves the names of all the files in the c:\temp directory that have the extension .txt. The code then iterates through the retrieved FileInfo collection of matching files and displays the name and size of each one.
Dim File, Files() As FileInfo ' Check all ...
Read now
Unlock full access