Renaming files after a name in the db field

From: Date: Wed, 13 Mar 2002 12:45:21 +0000
Subject: Renaming files after a name in the db field
Groups: php.general 
Request: Send a blank email to php-general+get-88315@lists.php.net to get a copy of this message
Hi there, I am wondering if this is possible in php: I have a whole bunch of files named after countrycodes. E.g. CA-map.gif Now I would like to rename those files after the country. This is listed in a dbtable containing the countrycode and countryname. E.g. CA - Canada How could I generate a php script which scannes the dir for matching Countrycode patterns and renames the filename ? E.g.: Make out of CA-map.gif -> canada-map.gif? Thanx for any hint, andy

« previous php.general (#88315) next »