a Directory Crawler

From: Date: Mon, 22 Sep 2003 15:59:11 +0000
Subject: a Directory Crawler
Groups: php.windows 
Request: Send a blank email to php-windows+get-21498@lists.php.net to get a copy of this message
I'm stuck. I have been attempting to put together a script with little tidbits I've found in the manual but I'm unable to figure out how to do this. Basically I have a directory structure on my server that runs many levels deep and wide. In the directories there are several files with the extension name ".schema" I would like to have my script go through and open each of these files (they are text files) and add the contents to a variable which I will then store in a database. I know how to display the contents of a directory, as well as open and read text files...and write to a database. The problem I'm having is building the component that traverses the directory structure pulling back all the files. I can make it read a single directory at a time but I'm at a loss to tell it how to navigate through the directories. This app is not for anything malicious, but I need a dynamic archive of all the schemas and if I get brave I want to write an extraction tool to extract the SQL queries from the schemas and catagorize them for future use. Thanks, Ron

« previous php.windows (#21498) next »