By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,664 Members | 1,656 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,664 IT Pros & Developers. It's quick & easy.

File Find Question

P: n/a
I looked in the manual and searched the web but did not see a file
find function that takes a wild card - I need to look for all files
such as:

$Array = FileFind('name_*.jpg');

And then I need to delete all such files.

Is there such a function?

Thanks...

Jul 16 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
In article <4f********************************@4ax.com>,
ra***@primemail.com says...
I looked in the manual and searched the web but did not see a file
find function that takes a wild card - I need to look for all files
such as:

$Array = FileFind('name_*.jpg');

And then I need to delete all such files.

Is there such a function?

Thanks...


Check out opendir() and readdir() - you'll need to write your own routine
to read files, but there is an example in the docs which almost does what
you want, IIRC. And to delete files, see unlink()

Cheers
--
Quod subigo farinam

$email =~ s/oz$/au/o;
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet?
Jul 16 '05 #2

P: n/a
Ralph Freshour wrote:
I looked in the manual and searched the web but did not see a file
find function that takes a wild card - I need to look for all files
such as:

$Array = FileFind('name_*.jpg');

And then I need to delete all such files.

Is there such a function?


Try searching for 'glob' in the manual.

--
Seks, seksić, seksolatki... news:pl.soc.seks.moderowana
http://hyperreal.info { iWanToDie } WiNoNa ) (
http://szatanowskie-ladacznice.0-700.pl foReVeR( * )
Poznaj jej zwiewne kształty... http://www.opera.com 007
Jul 16 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.