Sign in to follow this  
Followers 0
RogerL

FileGetTime gets time for folder?

4 posts in this topic

In 2005 there was discussion about implementing DirGetTime and DirSetTime and that FileGetTime and FileSetTime was modified by Holger to work with folders.

Did this get released? FileGetTime("G:\Tmp[\]", 0|1|2, 0|1) all return @error = 1 in my script

Share this post


Link to post
Share on other sites



This works for me...

$result = FileGetTime(@DesktopDir & "\Test", 1,1)

MsgBox(0,"",$result)

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

In 2005 there was discussion about implementing DirGetTime and DirSetTime and that FileGetTime and FileSetTime was modified by Holger to work with folders.

Did this get released? FileGetTime("G:\Tmp[\]", 0|1|2, 0|1) all return @error = 1 in my script

Yep, it's working. The only item of note being that to get the folder timestamp info, the query fails if you have the trailing slash "\" entered:

CODE

$folder = "C:\Temp"

$varCreated = FileGetTime($folder,1,1)

$varModified = FileGetTime($folder,0,1)

$varAccessed = FileGetTime($folder,2,1)

ConsoleWrite("Created: " &$varCreated &@CRLF &"Modified: " &$varModified &@CRLF &"Accessed: " &$varAccessed &@CRLF )

Edited by Monamo

- MoChr(77)& Chr(97)& Chr(100)& Chr(101)& Chr(32)& Chr(121)& Chr(97)& Chr(32)& Chr(108)& Chr(111)& Chr(111)& Chr(107)-------I've told you 100,000 times not to exaggerate!-------Don't make me hit you with my cigarette hand...-------My scripts:Random Episode Selector, Keyboard MouseMover, CopyPath v2.1, SmartRename for XP,Window Tracer[sup]New![/sup]

Share this post


Link to post
Share on other sites

To Monamo and weaponx

Thanks guys for the quick reply. I feel really stupid...looking more closely at my script on this tiny font on this mini notebook my old eyes can just make out that I typed a semi-colon instead of a colon after the drive letter.

Sorry for wasting your time.

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