Windows Vista Forums

resuable filename search using wildcards
  1. #1


    Daz Guest

    resuable filename search using wildcards

    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

      My System SpecsSystem Spec

  2. #2


    Pegasus \(MVP\) Guest

    Re: resuable filename search using wildcards


    "Daz" <darren.blackley@xxxxxx> wrote in message
    news:522bb762-3f86-4851-9fcc-5f21cc80d2e0@xxxxxx

    > 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?



      My System SpecsSystem Spec

  3. #3


    Todd Vargo Guest

    Re: resuable filename search using wildcards

    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.

    --
    Todd Vargo
    (Post questions to group only. Remove "z" to email personal messages)




      My System SpecsSystem Spec

resuable filename search using wildcards problems?

Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How can I search for a ( in the filename only? MBUnit Vista General 2 29 Mar 2009
Search port wildcards okparks General Discussion 0 19 Sep 2008
Forcing filename only search? Nigel Molesworth Vista General 1 24 Nov 2007
Vista Search doesn't find files by filename Puppy Breath Vista file management 15 06 Apr 2007
Recursive text search, displaying filename forestial PowerShell 4 22 May 2006