You could do it either way, whichever is more comfortable for you. I would go the MySQL route because for me it helps keep the code cleaner, and doesn’t require lots of filesystem access by the php script (but takes a bit more planning). As for importing the data into the database, well, there’s a lot of ways to do it. First, I would get a list of all the files (windows dir, unix ls commands would work), and modify into the necessary columns with your favorite editor. At work I have to use Excel and Notepad for this type of stuff, at home, I’d rather use Vi & various GNU Utils (basically opposite ends of the spectrum). Then, you could either write a simple importer in php (make sure only you have access, of course), or, if you have access to a mySQL GUI (I like phpMyAdmin) use that, or use the mysqlimport command to import the file (that will depend on what you have access to on the server). The other option, using php to parse the directories, your best bet would probably to read up on PHP’s filesystem functions:
http://us3.php.net/function.file hth