Re: Show Filename using Wildcards
| From: | Rahul Sitaram Johari | Date: | Thu, 29 Mar 2007 20:07:46 +0000 |
| Subject: | Re: Show Filename using Wildcards | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-251682@lists.php.net to get a copy of this message | ||
;)
Point taken!
<?php
exec("find /Users/rjohari/Documents/XFER/espi -type f name
".$row['PHONE']."*.vox", $files);
foreach ($files as $value) {
echo basename($value)."<br>";
}
?>
:)
Thanks
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Rahul Sitaram Johari
CEO, Twenty Four Seventy Nine Inc.
W: http://www.rahulsjohari.com
E: sleepwalker@rahulsjohari.com
³I morti non sono piu soli ... The dead are no longer lonely²
On 3/29/07 4:58 PM, "Peter Lauri" <lists@dwsasia.com> wrote:
> DON'T commit suicide mate :)
>
> What if you one day move the path? ;)
>
>
>> -----Original Message-----
>> From: Rahul Sitaram Johari [mailto:sleepwalker@rahulsjohari.com]
>> Sent: Thursday, March 29, 2007 9:54 PM
>> To: Peter Lauri; PHP
>> Subject: Re: [PHP] Show Filename using Wildcards
>>
>> 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!
>>
>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> Rahul Sitaram Johari
>> CEO, Twenty Four Seventy Nine Inc.
>>
>> W: http://www.rahulsjohari.com
>> E: sleepwalker@rahulsjohari.com
>>
>> ³I morti non sono piu soli ... The dead are no longer lonely²
>>
>>
>>
>> On 3/29/07 4:31 PM, "Peter Lauri" <lists@dwsasia.com> 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
>>>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>