Hi guys.
I have like hundreds of pictures in a folder
and then I use this function to rename them
all to a following number. but very often I
noticed that some pictures get lost and I
dont know where ? anyone can tell me
whats wrong ?
$dir = getcwd()."/dump/";
$dh = opendir($dir);
while (false !== ($filename = readdir($dh))) {
if(($filename <> ".")&&($filenam e <> "..")){
$pic_ctr++;
rename("dump/".$filename , "dump/".$pic_ctr.".jp g");
}
}
thanx for your help !
I have like hundreds of pictures in a folder
and then I use this function to rename them
all to a following number. but very often I
noticed that some pictures get lost and I
dont know where ? anyone can tell me
whats wrong ?
$dir = getcwd()."/dump/";
$dh = opendir($dir);
while (false !== ($filename = readdir($dh))) {
if(($filename <> ".")&&($filenam e <> "..")){
$pic_ctr++;
rename("dump/".$filename , "dump/".$pic_ctr.".jp g");
}
}
thanx for your help !
Comment