Hi guys,
I think this is a very simple problem but I've experimented with FindNextFile and can't seem to work it out.
I have a folder which has Excel files, a new file is put in their daily. I want my autoIT script to open up the most recently created file (when a button is pressed in a GUI, although this seems the easy bit to me!)
I assume something can be done through the FileGetTime Function but I'm not sure how to get my script to run through the files in the folder doing this???
Here is a simple function to return either an array sorted on the FT.. Flags or Filename
#include <Array.au3>
#include <File.au3>
Local $sLatestFileCreated = _FileVersion(@MyDocumentsDir, "*.xlsx", 1, False)
MsgBox(64, "Latest Created File Version", $sLatestFileCreated)
Local $aLatestFileCreated = _FileVersion(@MyDocumentsDir, "*.xlsx", 1, True)
_ArrayDisplay($aLatestFileCreated)
; #FUNCTION# =========================================