The thing is, I am testing an application where we check versions, builds and some other things in file properties of exe, jar and DLLs.(Please see the source file image for details). I use GetFileVersionInfo method for checking the fields specified above.
The problem is, "Time Stamp" field in file properties of a file is not windows owned field like others, but you can say explicit. FileVersionInfo is not returning the value stored for that field.
Please help me.
Thanks C-Sharpians :)
Saurabh
Saurabh PatwardhanPosted Jun 17, 2010, 2:57 AM
Thanks for replying.
Actually, the timestamp value you see in attached image is not the last write time. Its a generated build number of an application and its fixed. Now for an example, to get file version from file props. i do "f.FileVersion". Is there any method similar to this or anything else you can think of ?
Thanks again.
Kirtan PatelPosted Jun 16, 2010, 8:28 AM
private void button1_Click(object sender, EventArgs e)
{
FileInfo f = new FileInfo(@"C:\Users\Kirtan\Desktop\ConsoleArgument.exe");
DateTime dt = f.LastWriteTime;
MessageBox.Show("TimeStamp :" + dt.ToString("yyyyddMMHHMM"));
}