Re: Re: Listing for a specific list of files
| From: | David Robley | Date: | Thu, 11 Mar 2004 08:25:00 +0000 |
| Subject: | Re: Re: Listing for a specific list of files | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-180117@lists.php.net to get a copy of this message | ||
On 11 Mar 2004 at 10:18, Brent Clark wrote:
> Hi David
> Thanks for your feedback
> but im look not looking for the search to be based on the extension
>
> the fault it mine:
> im more looking for with the equivalent of
> ls -l 00*
>
> I basically just want all files with 00.
>
> Kind Regards
> Brent Clark
>
> >>Hi there
> >>
> >>I need to perform a function whereby I can list a directory (which is I
> >>can do) but the problem is that I want to list only a certain list of
> >>files that is in the directory. for example in linux I do a: ls -l
> >>00*.pdf
> >>
> >>If some one can knows of a url as an example or could help in some way.
> >>That would be most appreciated
> >>
> >>Kind regards
> >>Brent Clark
> >>
> >>
> >>
> >
> >http://au.php.net/manual/en/function.readdir.php and look
> >partway down
> >the user notes where there is an example that just gets image files.
> >
> >
> >
>
OK - then you could consider using strpos or substr on the file name to
determine whether it matches your criteria. If you are on a *nix host you
could of course do ls -l 00* using one of the system commands.
--
David Robley
Quod subigo farinam
"I'm a great opera singer," said Tom, being callous.