Dana Posted 23 hours ago Posted 23 hours ago I'm seeing some weirdness with FileSetTime. I have: Global $customapfile = @ScriptDir & "\databases\customap.txt" FileWrite($customapfile, "Loc Id|Name|Elevation|ARP Latitude DD|ARP Longitude DD" & @CRLF & "F001|Kill Devil Hill|90|36.014614|-75.667966" & @CRLF) FileSetTime($customapfile, "19031217103500", 1) ; set created time MsgBox(4096, "debug", "type 1 " & FileGetTime($customapfile, 0, 1)) FileSetTime($customapfile, "19031217103500", 0) ; set modified time MsgBox(4096, "debug", "type 0 " & FileGetTime($customapfile, 0, 1)) FileSetTime($customapfile, "19031217103500", 2) ; set accessed time MsgBox(4096, "debug", "type 2 " & FileGetTime($customapfile, 0, 1)) FileSetTime($customapfile, "19031217103500", 0) ; set modified time MsgBox(4096, "debug", "type 1 " & FileGetTime($customapfile, 0, 1)) ;FileDelete($customapfile) The first round (type 1) sets sets today's date in the windows explorer "date modified" column and the 1903 date in file properties dialog "created", today in "modified", FileGetTime shows today. The second round (type 0) blanks out the date in the explorer date modified column but shows the 1903 date in properties "created" and "modified", FileGetTime shows 1903. The third round (type 2), the date modified column is stall blank but still shows the 1903 date in both properties and FileGetTime. It seems nothing I can do will show the 1903 date in the explorer "modified" column, but a DOS dir command shows the 1903 date. But if I open the file in a text editor and resave it, the correct "modified" date shows in both explorer and autoit. Now I know the helpfile says, "Using a date earlier than 1980-01-01 will have no effect," but it certainly has an effect, just not a predictable one. This is Windows 10 Pro, NTFS.
argumentum Posted 22 hours ago Posted 22 hours ago 37 minutes ago, Dana said: I'm seeing some weirdness with ... ..and am seeing some weirdness with coding ideas 41 minutes ago, Dana said: It seems nothing I can do will show the 1903 date in... What prompted you to set a date such as 1903/12/17 10:35:00 ? Am just curious. (You can file a bug report to add something to AutoIt to return an error and do nothing if the date is outside the manual's delimitation.) Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now