Strong Coders Community

Where the extreme coders hang out.
Welcome to Strong Coders Community Sign in | Join | Help Messenger
in Search

File Dates

Last post 10-21-2006, 11:42 AM by Kevin Jones . 1 replies.
Sort Posts: Previous Next
  •  10-20-2006, 11:29 PM 948
    • almargob is not online. Last active: 10-20-2006, 11:29 PM almargob
    • Top 25 Contributor
    • Joined on 10-20-2006
    • Posts 3
    • Points 55

    File Dates

    I have an application that reads files from a database via a webservice call. I save the files in a folder at the client and every time the client connects to the server I bring the new updates and update the local client files. My question is what the properties of the file that will stay the same in client and the server side to use them in the comparison process taking into account the file version doesn't change very often. I used the creation date and the last write date and OS assigns a new date once the file is copied from the server to the client.

     Your help is appreciated

     Ala

    MCSD.Net

    • Post Points: 20
    • Alert the moderators
  •  10-21-2006, 11:42 AM 949 in reply to 948
    • Kevin Jones is not online. Last active: 2006/11/14, 10:02 AM Kevin Jones
    • Top 10 Contributor
      Male
    • Joined on 07-27-2006
    • Charleston, SC
    • Posts 64
    • Points 900
    • Moderator

    Re: File Dates

    When it copies the files all of the date properties change with it, since technically it is a new file. However, you can change the date properties to match the old when when you are copying them using

    File.SetCreationTime(string path, DateTime creationTime)

    and File.GetCreationTime(string path) to read the original times from the file you are trying to copy.


    Cheers,
         Kevin
    • Post Points: 5
    • Alert the moderators

Powered by Community Server, by Telligent Systems