1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

ASP Search for PDF Filenames

Discussion in 'C#' started by jonnokay_83, Jan 27, 2010.

  1. #1
    Hi All,

    I need to create an ASP-based search facility that will take a form field containing an inputted query from a user and search PDF filenames inside of 6 folders inside wwwroot/Paperwork/... for any PDF filenames that closely match the query e.g. user searches for "1004," the output brings back 100452.pdf and 231004.pdf as "1004" is part of both their filenames.

    I have already tried ASPSimpleSearch, and is almost what I need, but ASPSimpleSearch is not searching PDF filenames for me and it looking into the content of the PDF and trying to find a match there .... all I need is a close match to PDF filenames and not the content inside of it.


    Thanks.
     
    jonnokay_83, Jan 27, 2010 IP
  2. sdnsoft

    sdnsoft Member

    Messages:
    42
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    26
    #2
    Just use simple recurring function that is traveling through the subdirectories of your base documents directory using DirectoryInfo and when it fiends pdf files FileInfo[] files=di.GetFiles(prefix+"*.pdf"); those files are added to some array where you store matching results.
     
    sdnsoft, Feb 22, 2010 IP
  3. Ehmad

    Ehmad Peon

    Messages:
    107
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    using file system object u have to code urself such that it crawls and stores search results that can be displayed later to user.. FSO goes for filename not for content
     
    Ehmad, Mar 11, 2010 IP