
Recursive Directory Search
How about files? ie only search html and ASP files, and get the title using
FSO and regular expressions (what pattern should I use?). Also to exclude
files with a particular string starting the name, or exclude files/folders
in an array (data folder, include folder)?
ie
for(item in excluded){
excludefromsearch(item);
Quote:
}
I have done a kind of recursion before (files in folders, display links to
those files), but not too advanced.
Not too concerned about the speed of execution as it will not run for every
user, only occasionally directly on the server, or in a machine on the same
network. It may be put on a schedule (ie nightly at 1.00am), and run when a
major change is done to the site.
If possible, how could it be done using JScript and the Enumerator object -
or dictionary object? The data would then be put into a database.
Quote:
> I have a recursion sample you could modify. It's on my site, in the VB
Notes
> section
> HTH
> --
> Curt
> Software_AT_Darkfalz.Com
> http://www.Darkfalz.com
> ---------------------------------------------------------------
> ** And The Geek Shall Inherit The Earth
> ---------------------------------------------------------------
> > How would I go about searching through a directory and reporting back
> files
> > with web extensions (asp, html, htm...etc)?
> > I want the search to be recursive (ie search through subfolders as
well).
> I
> > may also want to not index certain files (ie staring with _hide_) or
> > folders.
> > I would want the results put in a database, including name+location of
> file,
> > page title (retrieved using regular expressions and the
FileSystemObject)
> > and modified date.
> > This database would be foundation for a site search, and the script
could
> be
> > run nightly (purging the database, and rebuilding it) either as an ASP
> page
> > or Windows Script. The search would report the location (as a hyperlink)
> and
> > modified time, with the page title as the link text.
> > Does anyone have any ideas?
> > I want it to be a database as the alternative (a live search using the
> > FileSystemObject) would be much slower and would be run every time
someone
> > did a search. If it was a database, only the database will be searched
and
> > not the files (as the script has already been run). If files are
> > deleted/added the script could be run again so as not to impact the site
> > users.
> > The database may be Access or SQL (I have no experience with SQL though)
> > TIA