I know I can re-write the file... but is there a more elegent way to change the file date?
Solved! Go to Solution.
Solved by Gary_J_Orr. Go to Solution.
I don't think you have to write anything. Just open it for append, then immediately close it again.
(close (open MyFile "a"))... then shouldn't this do it? For some reason it does not.
In that case I would simply append something that can be easily filtered out when reading, such as a line feed.
Try this:
copy the file to a new file (on my system doing so puts the current date-time to the property on the new file)
Delete the original
rename the new file to the original
(setq Filename "E:\\RandD\\filesystem.txt")
(setq tempFileName (strcat Filename "2"))
(vl-file-copy Filename tempFileName)
(vl-file-delete Filename)
(vl-file-rename tempFileName Filename)
-Gary