Jump to content

FileSetTime() Bug?


Recommended Posts

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
Spoiler

“Hello, ladies, look at your man, now back to me, now back at your man, now back to me. Sadly, he isn’t me, but if he stopped using ladies scented body wash and switched to Old Spice, he could smell like he’s me. Look down, back up, where are you? You’re on a boat with the man your man could smell like. What’s in your hand, back at me. I have it, it’s an oyster with two tickets to that thing you love. Look again, the tickets are now diamonds. Anything is possible when your man smells like Old Spice and not a lady. I’m on a horse.”

 

Link to comment
Share on other sites

  • Moderators

What happens if you omit the third param, and just let it use default instead of specifying the 0?

Edited by JLogan3o13

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

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

Spoiler

“Hello, ladies, look at your man, now back to me, now back at your man, now back to me. Sadly, he isn’t me, but if he stopped using ladies scented body wash and switched to Old Spice, he could smell like he’s me. Look down, back up, where are you? You’re on a boat with the man your man could smell like. What’s in your hand, back at me. I have it, it’s an oyster with two tickets to that thing you love. Look again, the tickets are now diamonds. Anything is possible when your man smells like Old Spice and not a lady. I’m on a horse.”

 

Link to comment
Share on other sites

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.

Spoiler

“Hello, ladies, look at your man, now back to me, now back at your man, now back to me. Sadly, he isn’t me, but if he stopped using ladies scented body wash and switched to Old Spice, he could smell like he’s me. Look down, back up, where are you? You’re on a boat with the man your man could smell like. What’s in your hand, back at me. I have it, it’s an oyster with two tickets to that thing you love. Look again, the tickets are now diamonds. Anything is possible when your man smells like Old Spice and not a lady. I’m on a horse.”

 

Link to comment
Share on other sites

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
 Share

×
×
  • Create New...