Sign in to follow this  
Followers 0
pixels75

FileSetTime, FileGetTime and MilliSeconds

8 posts in this topic

Hi !

I can't manage milliseconds with FileSetTime and FileGetTime (RoboCopy use it for comparing files).

I think it's specific to NTFS. Anyone know a simple way to do it ?

Thanks

Share this post


Link to post
Share on other sites



Hi !

I can't manage milliseconds with FileSetTime and FileGetTime (RoboCopy use it for comparing files).

I think it's specific to NTFS. Anyone know a simple way to do it ?

Thanks

You can rip the _Time_GetFileTime and _Time_SetFileTime functions from Auto3Lib. They handle milliseconds. Check the Auto3Lib help file for examples on usage.

Auto3Lib: A library of over 1200 functions for AutoIt

Share this post


Link to post
Share on other sites

You can rip the _Time_GetFileTime and _Time_SetFileTime functions from Auto3Lib. They handle milliseconds. Check the Auto3Lib help file for examples on usage.

Perfect ! Waow, great job your "Auto3Lib", next time I start by looking on it !

I was trying to match the time / date of two files, $hFileSrce and $hFileDest.

CODE

$aTime = _Time_GetFileTime($hFileSrce)

$pCreateTime = DllStructGetPtr($aTime[0])

$pLastAccess = DllStructGetPtr($aTime[1])

$pLastWrite = DllStructGetPtr($aTime[2])

_Time_SetFileTime($hFileDest, $pCreateTime, $pLastAccess, $pLastWrite)

Thank's a lot ! :)

Share this post


Link to post
Share on other sites

Perfect ! Waow, great job your "Auto3Lib", next time I start by looking on it !

I was trying to match the time / date of two files, $hFileSrce and $hFileDest.

CODE

$aTime = _Time_GetFileTime($hFileSrce)

$pCreateTime = DllStructGetPtr($aTime[0])

$pLastAccess = DllStructGetPtr($aTime[1])

$pLastWrite = DllStructGetPtr($aTime[2])

_Time_SetFileTime($hFileDest, $pCreateTime, $pLastAccess, $pLastWrite)

Thank's a lot ! :)
You're welcome. :)

Auto3Lib: A library of over 1200 functions for AutoIt

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

On 6/2/2007 at 6:35 AM, PaulIA said:

 

You can rip the _Time_GetFileTime and _Time_SetFileTime functions from Auto3Lib. They handle milliseconds. Check the Auto3Lib help file for examples on usage.

 

Edited by ScottSaltz

Share this post


Link to post
Share on other sites

@ScottSaltz any explanation on why you resurrected a 7 year old thread, just to quote what someone else already said?


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites
Just now, JLogan3o13 said:

@ScottSaltz any explanation on why you resurrected a 7 year old thread, just to quote what someone else already said?

sorry, just looking for help that's all... i tried to delete the message after a little more research...again, sorry

Share this post


Link to post
Share on other sites
31 minutes ago, JLogan3o13 said:

@ScottSaltz any explanation on why you resurrected a 7 year old thread, just to quote what someone else already said?

sorry, just looking for help that's all... i tried to delete the message after a little more research...again, sorry... guess i'm too stupid to ask for help

Share this post


Link to post
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
Sign in to follow this  
Followers 0