Jump to content

Recommended Posts

Posted (edited)

Using FIleSetTime() to update the Date Modified tag on a copied file. I noticed that while it's updating the Modified time, it also updates the Created time.

$sFile = @DesktopDir & "FileSetTime Testtest.txt"
$hFile = FileOpen($sFile, 9)
FileWrite($hFile, "Test")
FileCLose($hFile)
FileSetTime($sFile, "20120101123456", 0)
msgbox(16 + 262144,@ScriptName, "Check the file properties.")
FileSetTime($sFile, "20120622245612", 0)
msgbox(16 + 262144, @ScriptName, "Check it again...")

EDIT: Looking at the bug tracker... I suppose I should note that the files sit on a NAS (linux)...

Tested my above code and it seems to work fine, so I suppose the NAS is the problem.

Edited by mechaflash213
  Reveal hidden contents

 

Posted

@JLogan, I just discovered that my above code actually works, but when targeting files on my NAS via mounted network drive, it happens =/

  Reveal hidden contents

 

Posted

I just remembered... Linux doesn't save a "Created" timestamp for files in its file system. So by the looks of it... it's adopting the Modified timestamp, and placing it into the Created timestamp.

  Reveal hidden contents

 

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...