Pegasus (MVP) wrote:
> Daz wrote:
> > Hi all,
> > Have been searching the net for a very small and reusable filename
> > search function i can use in scripts.
> > basically what i am looking for is something like
> > function GetTheName(oExt)
> > 'get the filename using wildcard e.g. *.txt in the current folder
> > set the name = myname.txt
> > End Function
> > Appreciate your help.
> > Cheers,
> > Daz
> You already asked about wildcards in your previous post.
> How is this question different from the previous one?
The solution offered excluded the use of a wildcard. i.e. for the *.theme
question, the solutions offered instructed to drop the * and dot from the
extension. Suppose the purpose was for the user to furnish something like
2007*.txt or MVP*101.DOC on the command line or an InputBox. Such a need
requires a more generic solution (hence, "reusable filename search
function") but IMO, the OP should have given better examples of the purpose
and include a practical usage to avoid being asked how the question differs
from the previous one. Just my observation.
(Post questions to group only. Remove "z" to email personal messages)