Agreed! And definitely modified my code to use basename() <?php exec("find /Users/rjohari/Documents/XFER/espi -type f -name ".$row['PHONE']."*.vox", $files); foreach ($files as $value) { echo basename($value)."<br>"; } ?> Thanks! On 3/29/07 3:58 PM, "Tijnema !" <tijnema@xxxxxxxxx> wrote: > On 3/29/07, Rahul Sitaram Johari <sleepwalker@xxxxxxxxxxxxxxxx> wrote: >> Ave, >> >> This Works!! >> >> <?php >> exec("find /Users/rjohari/Documents/XFER/espi -type f -name >> ".$row['PHONE']."*.vox", $files); >> foreach ($files as $value) { >> echo substr($value,35)."<br>"; >> } >> ?> >> >> THANKS! > > I recommend using basename($value) instead of substr($value,35) > If the directory changes, the basename would still return valid > values, while substr wouldn't > > Tijnema >> >> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> Rahul Sitaram Johari >> CEO, Twenty Four Seventy Nine Inc. >> >> W: http://www.rahulsjohari.com >> E: sleepwalker@xxxxxxxxxxxxxxxx >> >> ³I morti non sono piu soli ... The dead are no longer lonely² >> >> >> >> On 3/29/07 4:31 PM, "Peter Lauri" <lists@xxxxxxxxxxx> wrote: >> >> >>> [Peter Lauri - DWS Asia] >>> >>> Hi, >>> >>> Assuming you are on a linux you could try: >>> >>> exec("find /the/path/to/the/place/where/you/should/start/searching -type f >>> -name 515515515*.ext", $files); >>> >>> Then the $files will be an array with the found files matching the search. >>> >>> Best regards, >>> Peter Lauri >>> >>> www.dwsasia.com - company web site >>> www.lauri.se - personal web site >>> www.carbonfree.org.uk - become Carbon Free >>> >>> -- >>> PHP General Mailing List (http://www.php.net/) >>> To unsubscribe, visit: http://www.php.net/unsub.php >>> >> >>