If the file in question is mapped to a network drive and you can access it,
you should be able to create a fileinfo object and use the creationtime
method. i.e.
FileInfo fi = new FileInfo("m:\remote\file.xml"); // or
\\\\server\\remote\\file.xml for unmapped resource
DateTime dt = fi.CreationTime();
For a remote xml file given by Url, you can use the WebClient to download
the file to a local store but its creation time will reflect the download,
not its original. Unless the remote web server is configured to supply that
info in the content headers, which its usually not, I am not sure how you
would obtain it...
ok,
aq
"Frederik" <ae************@hotmail.com> wrote in message
news:uW****************@tk2msftngp13.phx.gbl...
Hi all,
I want to build an update function into my windows forms application. I
want an xml file to be downloaded from a server, only if it is newer then the
existing one.
The DownloadFile method seems to be useful for downloading, but after
that, what would be the best way to check if the file on the server is more
recent? How can I check it without downloading the file?
Any help is appreciated,
Frederik