One liner for finding a file

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • D. Alvarado

    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
  • steve

    #2
    Re: One liner for finding a file

    "D. Alvarado" wrote:[color=blue]
    > Hello, Does anyone have a PHP 4 one-liner (or two-liner) for[/color]
    extracing[color=blue]
    > 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[/color]

    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

    Comment

    Working...