rejetto forum

Search files function

chrno · 11 · 8666

0 Members and 1 Guest are viewing this topic.

Offline chrno

  • Occasional poster
  • *
    • Posts: 41
    • View Profile
Hi everybody,
Surelly you have been in this situation: you're in rush and you need to find a file and you don't know where it is ... well that's why I'm requesting all your knowledage to make a search-files function for HFS templates.
I think there're two ways to do it, the first one is a script that search the %list% generated by HFS and then display a list with the results in a [search-results] section (hard way)
The second way is rejetto add a "wonderful" %search% section where user inputs the file name or extension and HFS returns the matches in the [search-results] or another "special" page.

what do you think?  ;)



 


Offline TSG

  • Operator
  • Tireless poster
  • *****
    • Posts: 1935
    • View Profile
    • RAWR-Designs

Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13523
    • View Profile
you ask for a recursive file list, then use the search feature of your browser. ( /~files.lst?recursive )

you may even create a javascript function that downlods such list and search in it.


Offline traxxus

  • Occasional poster
  • *
    • Posts: 62
    • View Profile
I think, rejetto himself is the best way to implement a search "engine"  ;D
traxxus.dyndns.org:100


Offline Foggy

  • Tireless poster
  • ****
    • Posts: 806
    • View Profile
I use a simple batch file to create a site map that you can search with your browsers search, similar to what That_stevens_guy asked for. the only requirments of it are you need to be using real folders with the same file structure that is represented on hfs as the folders on the hdd.
the batch file runs this command from within the root folder and creates a text file called site map with a map of all folder and files.
Code: [Select]
for %%B in (.) do tree "%%~fB" /F>"Site Map.txt"
Foggy


Offline Giant Eagle

  • Tireless poster
  • ****
    • Posts: 535
  • >=3 RAWR!
    • View Profile
    • RAWR-Designs.com
you ask for a recursive file list, then use the search feature of your browser. ( /~files.lst?recursive )

you may even create a javascript function that downlods such list and search in it.

Yes, i've been thinking about this one..

But calling a complete file list on my fileserver makes it hang for about 2 hours resulting in a 2gig file list that is sended to the client.

Well... not really, but a complete list is asking too much of HFS to be called usefull. 'specially on slow servers with +2000 files.

The idea posted by Foggy is a good one too, except that you have to run that batch file every time a new file has been added to the fileserver in order to be completely usefull.


Offline Foggy

  • Tireless poster
  • ****
    • Posts: 806
    • View Profile
yeah, thats the only drawback to my idea but when im the only one the adds files to my hfs it works for me. :D


Offline maverick

  • Tireless poster
  • ****
    • Posts: 1052
  • Computer Solutions
    • View Profile
I suppose a site filename dump is ok if you are giving everybody access to all of the files on your server.  In my case, I set up different access levels for different types of users.  For example, my Guest users only get search results for their access level, my more trusted and registered users get search results for their access levels ... etc.  An actual search engine is used.
maverick


Antseh

  • Guest

Offline maverick

  • Tireless poster
  • ****
    • Posts: 1052
  • Computer Solutions
    • View Profile
Maverick, what search engine do you use?
Search Engine Builder Pro.  More info HERE.
maverick