I am renaming image[integer].jpg cam capture files using
Code: Select all
$startingWrite=0;
$begRead=0;
$endRead=240000;
for ($i=$startingWrite,$inc=0;$inc<($endRead+1);$i++,$inc++) {
$IMAGE_SOURCE = ("image".$begRead.$inc).".jpg";
if (!fopen($IMAGE_SOURCE,"rb"))
$i--;
else {
$OUTPUT_FILE = "image".$i.".jpg";
rename($IMAGE_SOURCE, $OUTPUT_FILE);
}
}
It bombs if $endRead is larger than 37663. Is this some sort of PHP integer limit or a connection timeout limit? It doesn't appear to be a timeout problem as I tried
$begRead=240000;
$endRead=245000;
with the same resutls. I thought maybe PHP needed dos 8+3 file naming but that wasn't it either.
Anyone know?
Thanks in advance if you do!