Re: Rename

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Jan 24, 2008 3:51 PM, Pastor Steve <smarquez@xxxxxxxxxxxxxxx> wrote:

> I have been looking, but the problem is that I don¹t know what questions
> to
> ask or what to look for. I think it is a rename function. That works, but
> it
> only does one file at a time. I was looking for something that will do all
> the files in the directory without needing to know the name of each file.
>
> I couldn¹t find anything like that there.


use opendir() to get a list of files in the source directory.
use  readdir() to iterate over the list of files in that directory.
then within that loop you can call the rename() function on
each value.

-nathan

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux