471,090 Members | 1,277 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,090 software developers and data experts.

One liner for finding a file

Hello, Does anyone have a PHP 4 one-liner (or two-liner) for extracing
a file from a directory in which I know the word "footer" is
guaranteed to be in the file name, I know the precise directory to
search, and I am assured that at most one file will match this
description. I am looking to get the complete path to this file.

Thanks in advance, - Dave
Jul 17 '05 #1
1 1471
"D. Alvarado" wrote:
Hello, Does anyone have a PHP 4 one-liner (or two-liner) for extracing a file from a directory in which I know the word "footer" is
guaranteed to be in the file name, I know the precise directory to
search, and I am assured that at most one file will match this
description. I am looking to get the complete path to this file.

Thanks in advance, - Dave


You can always execute an OS command. So you can say in Linux:
$a = `ls *footer*`;

--
http://www.dbForumz.com/ This article was posted by author's request
Articles individually checked for conformance to usenet standards
Topic URL: http://www.dbForumz.com/PHP-liner-fi...ict138692.html
Visit Topic URL to contact author (reg. req'd). Report abuse: http://www.dbForumz.com/eform.php?p=463587
Jul 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

8 posts views Thread by Paul Watson | last post: by
4 posts views Thread by Neal Becker | last post: by
reply views Thread by Xah Lee | last post: by
8 posts views Thread by Mantorok Redgormor | last post: by
5 posts views Thread by g.kanaka.raju | last post: by
3 posts views Thread by srinivasan srinivas | last post: by
37 posts views Thread by c.lang.myself | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.