General information
Title:
Using Wildcards in WSH
I have a file that arrives on a regular basis with a name similar to
24-JUL-2002.done
I have to write a batch file that fires when the filename changes from my own
done file.
so
24-JUL-2002.done arrives but my file is called 23-FEB-2002.done so some event must take place.
My problem is that since the first part of the name keeps changing I can only access the files using wildcards ie *.done
A program called IFSAME.EXE I used to use for this purpose no longer functions for some reason.
It looks like the WSH could solve this problem but I dont know where WSH will allow me to use wildcards.
modifying the code below to search for file names that end in .Done will probably do what I want but I have this nagging feeling I am missing something. Surely the file system object can handle wildcards.
Dim filesys, demofolder, fil, filecoll, filist
Set filesys = CreateObject("Scripting.FileSystemObject")
Set demofolder = filesys.GetFolder("foldername")
Set filecoll = demofolder.Files
For Each fil in filecoll
filist = filist & fil.name
filist = filist & "
"
Next
Response.Write filist
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only