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