[EMAIL PROTECTED] wrote:
> 
> ----- Original Message ----- 
> From: "Wade Smart"
> 
> I didnt respond to the permissions as I had already previously indicated
> , but perhaps it was unclear, their setting.
> 
> Files/ folder is 1600774
> Files within the folder are 600664.
> 
> I changed the folder to 1600777 and the files to 600666 but still
> received the same result as last posted. The script itself is 600666.
> 
> The full script is a follows:
> 
> <snip>
> 
> foreach($file_count as $newfile){
>    while($count >0){
>       rename($dirName.$newfile, $dirName.$count."_".$newfile);
> $count--;
> 
> }
> }
> 
> Wade
> ---------------------------
> Hello Wade,
>                   I one problem and one potential problem.
> 
> In your while statement you are trying to rename a file twice and this will 
> not work because once it's name has change the first time you cannot use the 
> original name again as a reference.
> 
> Try this -
> 
> foreach($file_count as $newfile)
>   {
>   rename($dirName.$newfile, $dirName.$count."_".$newfile);
>   $count--;
>   }
> 
> The potential problem is the $dirName.$newfile because $dirName is not a 
> full path. This will crash when there are symlinks.
> 
> Hope that helps, Rob. 
> 
01182008 1326 GMT-6

Thanks Rob. That worked.

Question. From my original code you can see I scan the directory, post 
how many files are in the directory and their names. Next I rename them. 
All that is working. What I want to do now is run another scan on the 
directory posting the "new" file names. Im just reusing the same code 
from above. However, its not putting out any names.

Is there a problem of, because this is sequential that once the names 
are changed php cant get another reading on the file names?

Wade

Reply via email to