about today's article "A Text-Based Search Eng

Results 1 to 2 of 2

Thread: about today's article "A Text-Based Search Eng

  1. #1
    kichang Guest

    Default about today's article "A Text-Based Search Eng

    Hello.<BR>Can I ask some question?<BR><BR>I&#039ve tested today&#039s article "A Text-Based Search Engine".<BR>It&#039s quite good article, also useful.<BR>But That search just in root directory(one directory).<BR>So, Is there any way that I can search files among all directory<BR>in wwwroot&#039s directory.<BR><BR>If there is a way to do so.<BR>Can anybody answer me?<BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: about today's article

    There is. If you just want to search through those folders *immediately* after the wwwroot folder, you just need to loop through the SubFolders collection. So you would have a loop like:<BR><BR>Dim objSubFolder<BR>For Each objSubFolder in objFolder.SubFolders<BR> For Each objFile in objSubFolder.Files<BR> &#039Do loop<BR> Next<BR>Next<BR><BR>If you want to search ALL directories, then you need to use recursion. There are some articles on recursion on 4Guys. Just go to http://www.4GuysFromRolla.com/search/ and do a search for recursion. Happy Programming!<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts