Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
GetFiles() filter in DirectoryInfo()
Message
From
04/05/2009 10:02:01
 
 
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
VB 9.0
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01397697
Message ID:
01397759
Views:
33
>"When using the question mark wildcard character, this method returns only files that match the specified file extension. For example, given two files in a directory, "file1.txt" and "file1.txtother", a search pattern of "file?.txt" returns only the first file, while a search pattern of "file*.txt" returns both files".
>
>So if you know the length of rhe filename you could use the "?????.crp" format. If not (which is likely) I guess it's down to performing an additional filter on the results yourself. Either regex or String.EndsWith().......

Thanks
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Reply
Map
View

Click here to load this message in the networking platform