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. FileInfo Class

FileInfo Class

Scheduled Pinned Locked Moved C#
helpquestiondiscussion
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.
  • G Offline
    G Offline
    Gavin Jeffrey
    wrote on last edited by
    #1

    I am using the lastAccess property of this class to compare two files to determine which one is the latest copy. It works on my computer just fine but once it is installed and run on another pc it always returns todays date and time is equal to 12:00 am. I have checked the two seperate files and there accessed date is definetely not what it is displaying. Anybody got any ideas or thoughts on this issue ??

    M 1 Reply Last reply
    0
    • G Gavin Jeffrey

      I am using the lastAccess property of this class to compare two files to determine which one is the latest copy. It works on my computer just fine but once it is installed and run on another pc it always returns todays date and time is equal to 12:00 am. I have checked the two seperate files and there accessed date is definetely not what it is displaying. Anybody got any ideas or thoughts on this issue ??

      M Offline
      M Offline
      Mike Dimmick
      wrote on last edited by
      #2

      LastAccessTime indicates when the file was last read, not when last written. You probably want LastWriteTime. To stop the file system constantly writing the last access time, by default it updates once an hour. See Optimizing NTFS Performance[^] (from the XP Resource Kit) for more details. You can apply a registry setting[^] to disable the Last Access Time updates completely. It sounds as if this has been done on the PCs you're testing with. Stability. What an interesting concept. -- Chris Maunder

      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