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
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