Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Accessing file which chages its name

Status
Not open for further replies.

Meku

Technical User
Apr 17, 2006
1
0
0
FI
We are pulling RSS feed using VBScript but have encountered a small problem. The RSS XML file can't be overwriten (if done so we will encounter some serious problem) and therefore the XML file recieves a new name which we then unfortunately don't know how to access.

So the file "example.xml" gets a new name as "example;001.xml", the next time it is updated the file is example;002.xml and so on.

How do I target this?

were calling the file like this:

If rssFeed = "" Then
rssFeed = "C:\Documents and Settings\All Users\Documents\Scala\Content\example.xml"
End If

but this targets the exact file path and file example.xml

but as we get new files the right (latest) files are not accessed.

How do we target the vbscript to be able to read this most recent file?

Thanx a bunch for all your help!
 
Look at FSO like:
Set folder = fso.GetFolder("folder")
For Each file In folder.Files
If (Left(file.Name, 7)) = "example" Then
'do something
End If
Next
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top