Search for file

Discussion in 'ASP General' started by jodleren, Jul 9, 2010.

  1. jodleren

    jodleren Guest

    Hi

    Does anyone have any idea how I can do a fast search for a file on
    server.

    Say, abc.def on \\server\someplace\

    I made ascript which uses about 6 minutes for 2200 folders, ~3GB.
    Windows does that in ~10 sec.

    How can I do that search a lot faster?

    Sonnich
    jodleren, Jul 9, 2010
    #1
    1. Advertising

  2. jodleren

    jodleren Guest

    On Jul 9, 11:57 am, jodleren <> wrote:
    > Hi
    >
    > Does anyone have any idea how I can do a fast search for a file on
    > server.
    >
    > Say, abc.def on \\server\someplace\
    >
    > I made  ascript which uses about 6 minutes for 2200 folders, ~3GB.
    > Windows does that in ~10 sec.
    >
    > How can I do that search a lot faster?
    >
    > Sonnich


    I found the IXSSO, searched for some examples, found none that worked.
    Any links please?

    Sonnich
    jodleren, Jul 9, 2010
    #2
    1. Advertising

  3. jodleren

    Bob Barrows Guest

    jodleren wrote:
    > On Jul 9, 11:57 am, jodleren <> wrote:
    >> Hi
    >>
    >> Does anyone have any idea how I can do a fast search for a file on
    >> server.
    >>
    >> Say, abc.def on \\server\someplace\
    >>
    >> I made ascript which uses about 6 minutes for 2200 folders, ~3GB.
    >> Windows does that in ~10 sec.
    >>
    >> How can I do that search a lot faster?
    >>
    >> Sonnich

    >
    > I found the IXSSO, searched for some examples, found none that worked.
    > Any links please?
    >

    I've never needed to do this so all I can offer is this:
    http://www.google.com/search?hl=en&safe=active&q=IXSSO -.Net&aq=f&aqi=&aql=&oq=&gs_rfai=

    --
    HTH,
    Bob Barrows
    Bob Barrows, Jul 9, 2010
    #3
  4. jodleren

    Dan Guest

    "jodleren" <> wrote in message
    news:...
    > Hi
    >
    > Does anyone have any idea how I can do a fast search for a file on
    > server.
    >
    > Say, abc.def on \\server\someplace\
    >
    > I made ascript which uses about 6 minutes for 2200 folders, ~3GB.
    > Windows does that in ~10 sec.
    >
    > How can I do that search a lot faster?
    >
    > Sonnich


    Windows uses the Win32 API functions. You would need to write a COM DLL to
    do the searching and call that from your ASP page. There are plenty of
    examples, search for Google for the FindFile API call.

    How are you searching at the moment?

    --
    Dan
    Dan, Jul 9, 2010
    #4
  5. jodleren

    jodleren Guest

    On Jul 9, 7:54 pm, "Dan" <> wrote:
    > "jodleren" <> wrote in message
    >
    > news:...
    >
    > > Hi

    >
    > > Does anyone have any idea how I can do a fast search for a file on
    > > server.

    > How are you searching at the moment?
    >
    > --
    > Dan


    this way

    dim folderlist()
    set fso2 = CreateObject("Scripting.FileSystemObject")

    iListPos=0
    redim preserve folderlist(iListPos+1)
    folderlist(iListPos)=QDisk

    iCurrentPos=0
    response.write "list<br>"
    do while iCurrentPos<=iListPos
    Set f = fso2.GetFolder(folderlist(iCurrentPos))
    set ff = f.files
    For Each fname in ff
    if InStr(lcase(fname), item) then
    response.write "--Found: " & fname & "<br>"
    response.flush()
    end if
    next
    set ff=nothing
    Set ff = f.SubFolders
    For Each fname in ff
    iListPos=iListPos+1
    redim preserve folderlist(iListPos+1)
    folderlist(iListPos)=fname & "\"

    if InStr(lcase(fname), item) then
    response.write "--Found: " & fname & "<br>"
    response.flush()
    end if

    next
    iCurrentPos=iCurrentPos+1

    loop
    response.write iListPos & " folders tested"
    jodleren, Jul 9, 2010
    #5
  6. jodleren

    jodleren Guest

    On Jul 9, 4:31 pm, "Bob Barrows" <> wrote:
    > jodleren wrote:
    > > On Jul 9, 11:57 am, jodleren <> wrote:
    > >> Hi

    >
    > >> Does anyone have any idea how I can do a fast search for a file on
    > >> server.

    >
    > >> Say, abc.def on \\server\someplace\

    >
    > >> I made ascript which uses about 6 minutes for 2200 folders, ~3GB.
    > >> Windows does that in ~10 sec.

    >
    > >> How can I do that search a lot faster?

    >
    > >> Sonnich

    >
    > > I found the IXSSO, searched for some examples, found none that worked.
    > > Any links please?

    >
    > I've never needed to do this so all I can offer is this:http://www.google..com/search?hl=en&safe=active&q=IXSSO -.Net&aq=f&aqi...


    Tried this, thanks
    I got something to work, but new questions.
    I searches in the files, not the file names :)

    Half way there, but still... I tried www.alltheweb.com for searching,
    (dont like google), but actually there is not much about IXSSO out
    there....

    I am looking for "lost" drawing numbers on a FTP disk - which is a
    server \\server\ftpfolder which also is not accepted by the IXSSO


    Sonnich
    jodleren, Jul 9, 2010
    #6
  7. jodleren

    Dan Guest

    "jodleren" <> wrote in message
    news:...
    > On Jul 9, 7:54 pm, "Dan" <> wrote:
    >> "jodleren" <> wrote in message
    >>
    >> news:...
    >>
    >> > Hi

    >>
    >> > Does anyone have any idea how I can do a fast search for a file on
    >> > server.

    >> How are you searching at the moment?
    >>
    >> --
    >> Dan

    >
    > this way
    >
    > dim folderlist()
    > set fso2 = CreateObject("Scripting.FileSystemObject")
    >


    <code snipped>

    Right, so you're using the FileSystemObject. I noticed your reply about
    IXSSO (by the way, I'd suggest if you want to find additional help with this
    that you at least consider using Google, you might not like it but it's a
    good way to find far more than ATW indexes), it will work with a network
    share if the server on which the share is located has the indexing service
    running.

    Other than that, all I can suggest is that you use the FindFile API and
    create your own COM DLL. There is sample code here:

    http://support.microsoft.com/kb/185476

    although you'll need to strip it down a bit.

    I have a small app that uses the FindFile API to search the image folders
    that are shared by all the web sites I run, and it will rattle through
    almost 3 million files spread across almost 100,000 folders in less than a
    minute (actual file size is irrelevant as for a simple search on filename
    the APIs will simply use the MFT), but if you feel the need to draw a
    comparison this is 55.6GB of data).

    --
    Dan
    Dan, Jul 12, 2010
    #7
    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. =?Utf-8?B?TGFrc2htaSBOYXJheWFuYW4uUg==?=

    Google search result like site search!! How?

    =?Utf-8?B?TGFrc2htaSBOYXJheWFuYW4uUg==?=, May 5, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    671
    Lucas Tam
    May 6, 2005
  2. Andy
    Replies:
    1
    Views:
    357
    Jack Klein
    Nov 25, 2003
  3. Anand Pillai

    String search vs regexp search

    Anand Pillai, Oct 12, 2003, in forum: Python
    Replies:
    10
    Views:
    592
    Anand Pillai
    Oct 15, 2003
  4. mason66
    Replies:
    0
    Views:
    421
    mason66
    Jul 27, 2006
  5. Abby Lee
    Replies:
    5
    Views:
    398
    Abby Lee
    Aug 2, 2004
Loading...

Share This Page