JeffAllenNJ Posted January 22 Posted January 22 After a disk recovery, I have LOTS of files where the modification time is earlier than the create time. So, I wrote a little script to detect and correct. Unfortunately, FileSetTime is returning 0. $Mod = FileGetTime($File,0,1) $Cre = FileGetTime($File,1,1) If Int($Cre) > Int($Mod) Then FileSetTime($File, $Mod, 0) ws(@error,@extended) EndIf
argumentum Posted January 22 Posted January 22 Return Value Success: 1. Failure: 0 if error changing timestamp(s). ... $iRet = FileSetTime($File, $Mod, 0) ConsoleWrite($iRet & ' - ' & @error & ' - ' & @extended) ... Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
JeffAllenNJ Posted January 22 Author Posted January 22 You're right, it's not failing. My mistake all along. I misread the documentation thinking that CreateDate was 0 and ModDate was 1 but it's the other way around. I'm using the constants (ex; $FT_MODIFIED) now. argumentum 1
rudi Posted January 26 Posted January 26 "where the modification time is earlier than the create time" That's typical for several restores, when the backup doesn't preserve the CreationTime, then this time stamp is typically the "point-of-time-of-the-restore-process". Is this your result after the restore? Earth is flat, pigs can fly, and Nuclear Power is SAFE!
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