Find Code:
All Words
Any of the Words
Exact Phrase
Home
:
Code
:
Forums
:
Submit
:
Mailing List
:
About
:
Contact
Code
All
VB.NET
ASP.NET
C#
VB Classic
ASP Classic
Snippets
Popular
Resources
Submit Code
Forums
Articles
Tips
Links
Books
Contest
Link to us
The attached code shows how to locate files in a d
Author:
Ethan
E-mail:
Click to e-mail author
Submitted:
11/9/2000
Version:
VB6
Compatibility:
VB6
Category:
File Manipulation
Downloads:
10846
The attached code shows how to locate files in a directory using the FileSystemObject. You can search just within the specified directory or include all subdirectories in the search. Even though the FileSystemObject doesn't allow for wildcard symbols, I included code that shows how to use the wildcard symbol to help in locating a group of files. This allows you to do nested file searches with wildcards without using the Dir function or the FindFirstFile/FindNextFile API calls, which many peopele find confusing. "Test.bmp" will only return that file if found. "*.frm" will return all files that end in ".frm" and "Test*" will return all files that start with "Test". In addition, semi-colon separation of search strings is supported, so *.txt;*.exe will return all file with a .txt or .exe extension. Also included is an exampe of using the SendMessage API function to add a horizontal scroll bar dynamically to a list box. NOTE: The Microsoft Scripting Runtime must be referenced to access the FileSystemObject.
Home
|
Forums
|
Submit
|
Books
|
Mailing List
|
Advertising
|
About
|
Contact
© 2023 A1VBCode. All rights reserved.
Legal disclaimer & terms of use
Privacy statement