Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > File Searching

Reply
Thread Tools

File Searching

 
 
James
Guest
Posts: n/a
 
      01-13-2005
We have a need to search through an entire drive for a specific file name.
The process is currently written with recursive loops through each directory
and the Scripting.FileSystemObject. Problem is, it takes forever. When I
do a standard file search through Windows Explorer, it typically finds the
file I'm looking for within 5 seconds. Is there another approach to file
searching, or am I stuck with trying to make this recursive loop somehow
more efficient?

Thanks!
James


 
Reply With Quote
 
 
 
 
Richard Gutery
Guest
Posts: n/a
 
      01-13-2005
Easiest thing that I did for this kind of problem for a client, was to
create a ActiveX component in VB6, then used this component on the client
web site.

Typical time to find a file was less than 10 seconds when the file was
located in a 20 level folder structure on a 100GB drive that was 85% full.

Hope it helps.

"James" <(E-Mail Removed)> wrote in message
news:eOZq2wY%(E-Mail Removed)...
> We have a need to search through an entire drive for a specific file name.
> The process is currently written with recursive loops through each
> directory
> and the Scripting.FileSystemObject. Problem is, it takes forever. When I
> do a standard file search through Windows Explorer, it typically finds the
> file I'm looking for within 5 seconds. Is there another approach to file
> searching, or am I stuck with trying to make this recursive loop somehow
> more efficient?
>
> Thanks!
> James
>
>



 
Reply With Quote
 
 
 
 
Roland Hall
Guest
Posts: n/a
 
      01-13-2005
"James" wrote in message news:eOZq2wY%(E-Mail Removed)...
: We have a need to search through an entire drive for a specific file name.

How unorganized is this drive?

: The process is currently written with recursive loops through each
directory
: and the Scripting.FileSystemObject. Problem is, it takes forever.

And if your file was the last one searched, wouldn't Search also take a long
time although subsequent searches I believe are cached. So, if you cached
your search in FSO, would you get the same results by first searching your
cache?

: When I
: do a standard file search through Windows Explorer, it typically finds the
: file I'm looking for within 5 seconds.

This particular file or just in general. Define typically.

: Is there another approach to file
: searching, or am I stuck with trying to make this recursive loop somehow
: more efficient?

Perhaps a COMponent that can use APIs might be faster. Without seeing your
code, who knows if your routine can become more efficient?

--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp


 
Reply With Quote
 
Daniel M. Hendricks
Guest
Posts: n/a
 
      01-13-2005
You need to index your data. Have a process that spiders your
site/files and then search that index. MS Index Service is probably
easiest, as it's built into Windows.
http://www.kevinroth.com/projects/project.asp?id=371
Cheers,
Daniel
http://www.danhendricks.com

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Google search result to be URL-limited when searching site, but notwhen searching Web stumblng.tumblr Javascript 1 02-04-2008 09:01 AM
Searching a file for a string oliverjb@gmail.com Java 1 03-03-2006 12:31 AM
Newbie help: File searching and writing output to new file drew Ruby 6 10-28-2005 04:04 AM
Searching file tree for redundancies Terence Parker HTML 1 04-20-2004 10:29 AM
XP file Searching Gary ASP .Net 3 01-28-2004 11:21 AM



Advertisments