File date webservice

L

lorenzo.viscanti

Hi, I'm trying to realize a webservice that returns the date of a
specified file in a folder to check for new updates. If the file is
newer (i.e. it has been changed) I download it using HTTP. To retrieve
the date of the file I use File.GetLastAccessTime method. Keep in mind
that files are copied in this folder, so I can not use the creation
date or lastwrite date. Using explorer I found that the only date field
that changes when I copy a file in a new folder (using win explorer,
files are copied manually by users) is the last accessed date.
Windows explorer gives me the right date, but the getlastaccesstime
method updates the date everytime I download the file, so it appears
to be a new file everytime I check it.
Which one is the right method I should call to find the date the file
has been copied in that folder?
Thanks,
Lorenzo
 
L

lorenzo.viscanti

It seems that the File.GetLastAccessedTime method updates the date.
Using the FileInfo LastAccessedTime property I had no problem.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,240
Members
46,830
Latest member
HeleneMull

Latest Threads

Top