Re: direcorty listing
| From: | Curt Zirzow | Date: | Wed, 23 Jul 2003 13:44:37 +0000 |
| Subject: | Re: direcorty listing | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-156446@lists.php.net to get a copy of this message | ||
* Thus wrote FB (s021183@student.dtu.dk):
> Hi,
>
> I have a directory like structure below
>
> - cityname
> --townname
> ---busname
> ----day
> -----info.zip
>
> I want to write a script and let it search the directory and find the zip
> files open them do the operation and save the out file as
>
> cityname_townname_busname_day_info.txt
>
> I am doing it for any zip files so the last part is O.K. by now but I need a
> loop to go under the direcoty structure and search for them. Cause if the
> info file is at level 2 (I mean under the townname direcotry) than it means
> a brief info of the time table so it will be save as
> cityname_townname_info.txt
>
> I am not familiar with the direcotry functions. Can anybody help me with
> that?
http://php.net/dir
There are some examples on how to scan the directory there (even
recursion ones although I'd do them differently)
Curt
--
"I used to think I was indecisive, but now I'm not so sure."