1) All the images on our site have the form:
nb_firstname_lastname_0000x.jpg
The problem was with the lastname so I split each $file on '_' into the array $new_file...
0: nb
1: firstname
2: lastname
3: 0000x.jpg
... fix the lastname, in this case ...
$new_file[2] = "collcutt";
... then join $new_file back together and use rename().
2) Yes, the php file was sitting in the same folder as the images ... I thought I'd start by placing it here first.
3) I'm at home now (winXP) so I'll have to test your getcwd() tomorrow.
Thanks again for any help on this one ... I've had to make the changes by hand this time, but I need to solve this problem for other reason anyway.
P.S www.nbillustration.co.uk ... have a look in the artist's box for Lizzy Collcutt, if you feel the need for 'context'!!