View Single Post
Old 12-08-2009, 02:56 PM  
SmokeyTheBear
►SouthOfHeaven
 
SmokeyTheBear's Avatar
 
Join Date: Jun 2004
Location: PlanetEarth MyBoardRank: GerbilMaster My-Penis-Size: extralarge MyWeapon: Computer
Posts: 28,609
php.. heres what you want to do

make a new folder on your server called temp, upload all images to temp, upload the list of new names in a file called newlist.txt filenames should be on a new line
example
name1.jpg
name2.jpg
name3.jpg

save this is index.php
Code:
<?php

// open list
$list = file_get_contents("newlist.txt");
// split list into array
$listarray = explode("\n",$list);
// where to start list from , 0 = top
$count = "0";
// do something for each jpg in the folder starting with the first one
foreach (glob("*.jpg") as $filename) {
//rename the image to the corresponding name in the newlist.txt
rename($filename, "$listarray[$count]");
// show browser its done
echo "Renamed $filename -to- $listarray[$count]\n<br>";
$count = $count + 1;


}
?>
upload to the folder temp
chmod folder 777
run the index in your browser
__________________
hatisblack at yahoo.com

Last edited by SmokeyTheBear; 12-08-2009 at 02:59 PM..
SmokeyTheBear is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote