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. how to view property of a file in terms of coding

how to view property of a file in terms of coding

Scheduled Pinned Locked Moved C#
helptutorialquestion
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.
  • P Offline
    P Offline
    puppiesLover
    wrote on last edited by
    #1

    I need to monitor if there're any change to some files after some interval of time. To do this, i have to somehow know when the file is last modified. We can do it easily by right-clicking on the file and click on its property. But, in terms of coding, i need to know how to read the property/ where to find information about a file's property. Anybody knows? please help me out thanks puppiesLover

    N 1 Reply Last reply
    0
    • P puppiesLover

      I need to monitor if there're any change to some files after some interval of time. To do this, i have to somehow know when the file is last modified. We can do it easily by right-clicking on the file and click on its property. But, in terms of coding, i need to know how to read the property/ where to find information about a file's property. Anybody knows? please help me out thanks puppiesLover

      N Offline
      N Offline
      nfactorial
      wrote on last edited by
      #2

      Do you need to be notified when it's modified, or do you just want to store the modified time at one point and compare it again later? If you just want to store and compare then does the System.IO.FileInfo class do what you'd like? using System; using System.IO; FileInfo info = new FileInfo( "myfilename" ); DateTime modified = info.LastWriteTime; n!

      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