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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

fso.FileExists question

Status
Not open for further replies.

gbaughma

IS-IT--Management
Staff member
Nov 21, 2003
4,772
US
I have a web page that pulls a list of reports that are stored on a NAS TeraStation.

Essentially, it queries the database for the customer and project and pulls a list of report numbers, then does a fso.fileexists in ASP, and if it finds the file, puts a link on the screen that when clicked, streams the file to the user's browser.

Overall it works great.

Unless the person has a LOT of reports. Since there are several thousand reports on the NAS, and if a customer has a lot (2 or 3 dozen) reports, it can take up to 2 or 3 minutes to build the list.

Is there a faster way than looping the fso.FileExists to see if the file actually exists on a network drive?

I thought about building a table that lists all of the files, except that some of this can happen "real time", so doing a once-a-day file list isn't really helpful.

Perhaps there's an ASP routine that caches all the filenames in a folder that I could then scrub through? Or perhaps a single read to load the filelist into an array (so it's only one call to the NAS)?

What do you folks think? Any help is appreciated.



Just my 2¢

"What the captain doesn't realize is that we've secretly replaced his Dilithium Crystals with new Folger's Crystals."

--Greg
 
I think your idea of once-a-day table build to the database is the right way, but make it once an hour. A scheduled vb script would do it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top