Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create table from search of files in folder

Status
Not open for further replies.

Tarnish

Technical User
Nov 13, 2006
221
US
Hi all,

I need to setup something where I can go to a folder, loop through the files with a certain extension, and search them for a specific url. When I find the url I need to be able to return the filename it's in.

The folder is known, as is the file extension. I've looped through a folder before to find txt documents to import using an import specification, so I know how to loop through the folder and look for the files of a given type.

What I don't know is how to open a file, read it's contents looking for a match for a url (a string variable the procedure will know at the start), and then return the name of the first file that has that url within it.

Can someone help?

Thanks,
t
 
Rats,

Meant to change the title before I submitted it. As the post indicates, I don't really need to make a table...
 
Where is the URL stored in the files?

What type of file is it? If it's a text file, you'll need to deal with text manipulation. If it's a Word or Excel file, you can use their Office objects for better control.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top