How I can get the Modified date of a file ?
-
Hi I make any File in PC, and I transfer him to PPC (Windows mobile) How I can get the Modified date of this file ? I try this: DateTime GG; FileInfo H = new FileInfo(@"c:\License.txt"); GG = H.CreationTime; GG = H.LastWriteTime; GG = File.GetCreationTime(@"c:\License.txt"); GG = File.GetLastAccessTime(@"c:\License.txt"); GG = File.GetLastWriteTime(@"c:\License.txt"); but I always get the Today date and time thank's in advance
-
Hi I make any File in PC, and I transfer him to PPC (Windows mobile) How I can get the Modified date of this file ? I try this: DateTime GG; FileInfo H = new FileInfo(@"c:\License.txt"); GG = H.CreationTime; GG = H.LastWriteTime; GG = File.GetCreationTime(@"c:\License.txt"); GG = File.GetLastAccessTime(@"c:\License.txt"); GG = File.GetLastWriteTime(@"c:\License.txt"); but I always get the Today date and time thank's in advance
Yes the output is correct!! because you have transferred the file only today!!! so that is the latest write time!!!
Have a Happy Coding.....
-
Yes the output is correct!! because you have transferred the file only today!!! so that is the latest write time!!!
Have a Happy Coding.....
-
That is quite difficult to do AFAIK! You can try implement this logic with the corresponding code! 1.Before File Transfer operation to your mobile device --------------> copy the present Created Time, LastWrite time and lastAccess time to a temporary variable! 2.Copy the File! 3.And reset the Created Time, LastWrite Time and LastAccess Time from your temporary variable! since these are properties, you can able to set them! i believe!!! So if your copy function performs all this three steps, then you will always get the creation date of file as same as your computer!!!! It may work!!!
Have a Happy Coding.....