Windows 7: can't change last write time of .eml file


  1. Posts : 5
    Windows 7
       #1

    Windows 7: can't change last write time of .eml file


    Hello,

    I have encountered a problem involving .eml files that I cannot explain.
    I wonder whether anyone knows something about it.

    I have a backup/restore program that scans all my files, and copies new
    and updated files to a USB key. When I start working on a different computer
    the program performs the reverse operation. After each file copy, the
    last write time of the target file is set to that of the source file.

    The program works without problems, except that for a subset of files with
    the extension .eml the last write time refuses to be changed. The change of
    the last write time is performed with the Win32 API function SetFileTime.
    The strange part is that SetFileTime returns a "success" value; however, on
    examination of the file properties it is seen that the time has not been
    set properly. Stranger still, when the program is run with a debugger, the
    last write time is set correctly.

    I have tried all possible things; for example, I tried running the program
    with administrator rights, I tried sleeping the program for a while before
    changing the last write time, etc. None of these things worked. The only
    thing that does work is changing the extension of the .eml files. When the
    extension is changed, the program works normally.

    Can anyone explain this behavior?

    Regards,
    bostjanv
      My Computer


  2. Posts : 5,092
    Windows 7 32 bit
       #2

    This may be helpful:

    eml files have wrong last modification date time – 2BrightSparks Help and Support

    If the article is correct and it is a permission issue, then it works in debug mode because debug has a high privilege level.

    I would make a restore point or use some other means to back up your registry before trying the solution in the article. Just in case.
      My Computer


  3. Posts : 5
    Windows 7
    Thread Starter
       #3

    Thanks a lot for this information. Regards, bostjanv
      My Computer


  4. Posts : 5,092
    Windows 7 32 bit
       #4

    bostjanv said:
    Thanks a lot for this information. Regards, bostjanv
    Sure thing. Please post your progress.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 14:07.
Find Us