Jump to content

_Date_Time Functions failing to return DateTime

Recommended Posts

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.

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
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...