Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Re: Creation date time

Re: Creation date time

Scheduled Pinned Locked Moved C#
csharphelptutorial
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    electriac
    wrote on last edited by
    #1

    I repeatedly am running into the same problem. I do scientific work where we use images, video, and sound files to record events. The time of the creation of the file is very important to us as often a file shows what happened at one moment in time and the next file shows what happened maybe only several seconds later. Since image files, video files, and sound files are all tagged with the date/time of their creation we have a record of when the file was created allowing us to make many observations as we know when the event happened. These files are created by many types of devices cameras, audio recorders, camcorders, etc. The problem I have is that when these files are copied the creation date becomes the date of the copy and the original “real” creation date is lost. Understanding this and I have resorted to using a drive mirroring pieces of software to copy my files from devices so the the “real” creation date is preserved as the date of the copy is of no importance to me. I am looking for ideas about how to go about writing a C# program to copy files and preserve the “real” creation date/time.

    L 1 Reply Last reply
    0
    • E electriac

      I repeatedly am running into the same problem. I do scientific work where we use images, video, and sound files to record events. The time of the creation of the file is very important to us as often a file shows what happened at one moment in time and the next file shows what happened maybe only several seconds later. Since image files, video files, and sound files are all tagged with the date/time of their creation we have a record of when the file was created allowing us to make many observations as we know when the event happened. These files are created by many types of devices cameras, audio recorders, camcorders, etc. The problem I have is that when these files are copied the creation date becomes the date of the copy and the original “real” creation date is lost. Understanding this and I have resorted to using a drive mirroring pieces of software to copy my files from devices so the the “real” creation date is preserved as the date of the copy is of no importance to me. I am looking for ideas about how to go about writing a C# program to copy files and preserve the “real” creation date/time.

      L Offline
      L Offline
      Luc Pattyn
      wrote on last edited by
      #2

      Hi George, I did tell you a couple of hours ago, modification datetime is the one to use. In Windows creation time is when you create the container, not the contents; modification time (or lastwrite time) is when you fill the container or in any way change the contents of the container. So if you create a new document at 9 o'clock, edit it again at 10, and copy the file at 11 o'clock using Explorer, then the original will have created=9 modif=10, and the copy will have created=11 modif=10. So looking at modif time, they are the same; looking at creation time you would get confused indeed. I set Windows Explorer to not show creation times and always show modification times. So it will not confuse me, the datetime I see is about the content; I don't care about container times. Of course, on top of the above, as you well know, some file types have a datetime information embedded in the data itself, such as the "picture taken" time inside a JPEG picture. :)

      Luc Pattyn [Forum Guidelines] [My Articles]


      Fixturized forever. :confused:


      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups