Accessing a file where name is not constant

(imported topic written by homer91)

Directory path say (c:\logs) is constant but the XMl file name I have to parse is not, it is a log file generated each time the client is rebooted so the log will contain failry up to date information.

example file names

100810141207.xml

100810162021.xml

10081814026.xml

100830112956.xml

additonally the file does not overwrite so you have multiple files in the one folder.

I know how to parse the file and get the info I want but dont know how to reference the file when the file name keeps changing, any ideas?

(imported comment written by Lee Wei)

Homer,

Here is one idea.

If the file you want has the latest modification time, then you can pick that out.

name of file whose (name of it ends with “.xml” and modification time of it = (maximum of modification times of files of folder “c:\logs”) ) of folder “c:\logs”

Lee Wei

(imported comment written by homer91)

brilliant, will give it a try