Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Find oldest file in folder
#2
Macro Find oldest file in folder
Code:
Copy      Help
str folder="$my qm$"
str fileName ;;can be eg = "*.txt"; finds all if empty

ARRAY(str) a
GetFilesInFolder a folder fileName 64 2
if(!a.len) out "no files"; ret
a.sort
;out a
DateTime t=val(a[0] 1 _i)
t.UtcToLocal
str sPath=a[0]+_i+1
out F"{sPath}    {t.ToStr(4)}"


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)