Recursive Directory Search 
Author Message
 Recursive Directory Search

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



Sat, 28 Aug 2004 18:05:22 GMT  
 Recursive Directory Search
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
---------------------------------------------------------------

Quote:
> 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



Sat, 28 Aug 2004 20:32:05 GMT  
 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



Sun, 29 Aug 2004 01:30:34 GMT  
 Recursive Directory Search
In the loop of the folder use FSO again to retrieve the File.Name and do a
comparison for .ASP .HTM .HTML etc..

--
Curt
Software_AT_Darkfalz.Com
http://www.Darkfalz.com
---------------------------------------------------------------
** And The Geek Shall Inherit The Earth
---------------------------------------------------------------

Quote:
> 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);
> }

> 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.



> > 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



Sun, 29 Aug 2004 01:39:32 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Recursive Directory Search

2. Recursive search?

3. Recursive font search with Aladdin GS?

4. FSO recursive search via file size

5. Recursive search

6. Searching big directory

7. searching active directory

8. Directory Searching!

9. File search within Active Directory

10. How to search directories in VbScript?`

11. searching a directory

12. Directory Search

 

 
Powered by phpBB® Forum Software