File Searching

Discussion in 'ASP General' started by James, Jan 13, 2005.

  1. James

    James Guest

    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
    James, Jan 13, 2005
    #1
    1. Advertising

  2. 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" <> wrote in message
    news:eOZq2wY%...
    > 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
    >
    >
    Richard Gutery, Jan 13, 2005
    #2
    1. Advertising

  3. James

    Roland Hall Guest

    "James" wrote in message news:eOZq2wY%...
    : 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
    Roland Hall, Jan 13, 2005
    #3
  4. Daniel M. Hendricks, Jan 13, 2005
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Gary

    XP file Searching

    Gary, Jan 24, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    329
    Steven Cheng[MSFT]
    Jan 28, 2004
  2. Replies:
    1
    Views:
    341
  3. Terence Parker

    Searching file tree for redundancies

    Terence Parker, Apr 20, 2004, in forum: HTML
    Replies:
    1
    Views:
    309
    brucie
    Apr 20, 2004
  4. drew
    Replies:
    6
    Views:
    168
  5. stumblng.tumblr
    Replies:
    1
    Views:
    192
    stumblng.tumblr
    Feb 4, 2008
Loading...

Share This Page