Page 1 of 1

load file with wildcard?

Posted: Mon May 22, 2006 2:34 pm
by bredoteau
Hi,

I need to read in files of which I dont know the exact filename.
They follow this format:


b+itemnumber+unknown_part+.jpg

So, I can identify each file by the itemnumber (there will be no two files with the
same itemnumber) but I dont know the full filename.

Is it possible in any way to retrieve the filename?
Or maybe the whole directory, I could retrieve it by hand then.


example:
getfullfilenameof(b123456*.jpg)
should result in:
b123456 Joplin CD red cover.jpg


Greets,

Posted: Mon May 22, 2006 2:42 pm
by feyd
glob() may be of interest.

Posted: Mon May 22, 2006 3:02 pm
by alex.barylski
Just to add to what Feyd has said...

http://ca3.php.net/fnmatch might also be of interest...

Posted: Wed May 24, 2006 12:51 am
by bredoteau
perfect, thanks!