Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.

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

12 Jul 2015   #1

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


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?


My System SpecsSystem Spec
15 Jul 2015   #2

Windows 7 32 bit

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 System SpecsSystem Spec
17 Jul 2015   #3

Windows 7

Thanks a lot for this information. Regards, bostjanv
My System SpecsSystem Spec

18 Jul 2015   #4

Windows 7 32 bit

Quote   Quote: Originally Posted by bostjanv View Post
Thanks a lot for this information. Regards, bostjanv
Sure thing. Please post your progress.
My System SpecsSystem Spec

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

Thread Tools

Similar help and support threads
Thread Forum
Windows File Explorer shows wrong time for updated file
In File Explorer - navigate to a folder in Documents, a recently saved file by Sketchup application shows date = 9/28/17 6:48 PM do a search for the same file, date shows = 9/29/17 1:32 PM << this one is correct. Open either file and they are the same content. This happened last night...
General Discussion
How can I write a batch file that opens a file in a program?
I wrote this batch file which does what I want it to do so far. @echo off "C:\Users\xxxxxx\Documents\HideTaskbar\HideTaskbar.exe" "C:\Program Files (x86)\VideoLANold\VLC\vlc.exe" "C:\Users\xxxxxx\Documents\HideTaskbar\ShowTaskbar.exe" exit
General Discussion
Windows boot time recent tripled even though SSD read/write has not
Hello everyone! I come to seek your yoda-like advice once again. Okay so here's my issue: I have a relatively new build with the specs listed below: asus 97h55-m pro intel core i3 -540 8gb ripjaws @1600 120gb corsair force gt SSD (system disk) 2 tb seagate green HD (storage) 1 tb wd black...
General Discussion
Batch file , change filename with system date and time infor
I wrote a bat file, to change a file name, test.txt to testMonthDayYearTime.txt here is what i wrote: ren c:\example\test.txt test%date:~4,2%%date:~7,2%%date:~10,4%%time:~0,2%%time:~3,2%%time:~6,2%%.txt But after running, the file name is test12182010 093012.txt, a space is ...
General Discussion
Change date and time stamp on file save...
When I create a file in Windows 7 and save it I get the current date and time stamp but when I edit the program at a later time and date and save again it doesn't change the date and time stamp it stays the same as the original file! I feel like a moron but how can I change this?
Performance & Maintenance

Our Sites

Site Links

About Us

Find 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 07:55.
Twitter Facebook Google+