----- 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. 

Reply via email to