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

bostjanv

New member
Local time
11:33 PM
Messages
5
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 My Computer

At a glance

Windows 7
Computer Manufacturer/Model Number
Lenovo/T500
OS
Windows 7

My Computer My Computer

At a glance

Windows 7 32 bitAMD 5200+ dual core2 GBNVidia GeForce 6150SE 128 MB
Computer Manufacturer/Model Number
HP Media Center
OS
Windows 7 32 bit
CPU
AMD 5200+ dual core
Memory
2 GB
Graphics Card(s)
NVidia GeForce 6150SE 128 MB
Monitor(s) Displays
CRT
Screen Resolution
1280x1024
Hard Drives
500 GB Sata internal :

SIIG USB 3.0 docking stations w/WD Caviar Black 6 Gb/s drives
Keyboard
PS/2
Mouse
PS/2 Wheel Mouse
Other Info
SIIG USB 3.0 PCIexpress card.
Thanks a lot for this information. Regards, bostjanv
 

My Computer My Computer

At a glance

Windows 7
Computer Manufacturer/Model Number
Lenovo/T500
OS
Windows 7

My Computer My Computer

At a glance

Windows 7 32 bitAMD 5200+ dual core2 GBNVidia GeForce 6150SE 128 MB
Computer Manufacturer/Model Number
HP Media Center
OS
Windows 7 32 bit
CPU
AMD 5200+ dual core
Memory
2 GB
Graphics Card(s)
NVidia GeForce 6150SE 128 MB
Monitor(s) Displays
CRT
Screen Resolution
1280x1024
Hard Drives
500 GB Sata internal :

SIIG USB 3.0 docking stations w/WD Caviar Black 6 Gb/s drives
Keyboard
PS/2
Mouse
PS/2 Wheel Mouse
Other Info
SIIG USB 3.0 PCIexpress card.
Back
Top