Sign in to follow this  
Followers 0
bnahrwold

_Date_Time Functions failing to return DateTime

1 post in this topic

I need to be able to process subdirectories in a build directory to determine which dir has the latest date/timestamp. I have tried the following code:

I created C:\test\47, c:\test\48, C:\test\49 (all directories) and C:\test\50 ( a file)

I then try:

#include <data.au3>

#include <Array.au3>

$file="C:\test\47" ; This is a directory

$fileHandle1=_WinAPI_CreateFile($file1, 2, 2) ; Opening in read mode

$aTime1=_Date_Time_GetFileTime($fileHandle1) ; Trying to get date/time info

_ArrayDisplay($aTime1, "ATime1") ; Produces a spreadsheet of three empty elements

_WinAPI_CloseHandle($fileHandle1) ;Produces an error that the handle is invalid

I'm not tied to this code but nothing I have tried is returning data/timestamps for directory entries. Any help would be appreciated.

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