Re: how to get the file name from using a wildcard



On May 23, 3:53 am, Tom Lavedas <tglba...@xxxxxxx> wrote:
On May 22, 3:08 pm, "Pegasus \(MVP\)" <I....@xxxxxxxxxx> wrote:

sExt = "Theme" ' no dot
with CreateObject("Scripting.FileSystemObject")
For Each oFile In .GetFolder(".").Files
  If UCase(.GetExtensionName(oFile.Name)) = Ucase(sExt) Then _
    Wsh.Echo oFile.Path
Next
end with ' FSO

Tom Lavedas
===========http://members.cox.net/tglbatch/wsh/

Hi Tom,

This is in the right direction of what i am looking for... How do i
only get the file name without the directory path?

Cheers,
Daz
.



Relevant Pages

  • Re: SHO DEV xxx/FILE on LD devices
    ... %DISM-W-CANNOTDMT, $1$LDA1: cannot be dismounted ...     to the directory path and files? ... Contact Jur van den Burg at www.digiater.nl: ...
    (comp.os.vms)
  • Re: Query HTTP Status Code Using WSH
    ... Kind regards ... "Tom Lavedas" wrote: ... is that it should email me if the response is an error. ...   oXML.open "GET", sURL, False ...
    (microsoft.public.scripting.wsh)
  • Re: vbs script display mapped network driver
    ... Tom Lavedas ...   ... Dim sComputer, objWMI, colItems, objItem, sQry ...
    (microsoft.public.scripting.vbscript)
  • Re: Short Path Name via VB.NET
    ...   Dim fso As Object, f As Object, oFile As Object ... the choice of of P/Invoke vs COM Interop - I'll lean toward P/Invoke because ... The second reason is the same as why I never used the FSO stuff way back when ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Remove Old Entries in Text Document
    ...   I wish I could advise on sample scripts. ... oFile is a File object that was obtained via FSO. ... Since an array is ...
    (microsoft.public.scripting.vbscript)