I'm looking to create an array of file names and their modified time. I can build the arrays separately. But how can I build this in a way to be like
[ [file1, modtime1], [file2, modtime2], ...]
Here is the script that builds each individual array.
modTime := []
filenames := []
counter := 1
Full_Path := "C:\Users\me\MyDocs\*.txt"
Loop, %
{
modTime[counter]:=A_LoopFileTimeModified
filenames[counter]:=A_LoopFileFullPath
counter++
}
loop % modTime.MaxIndex()
items.= modTime[A_Index] ","
StringLeft, items, items, Strlen(items)-1
msgbox % items
loop % filenames.MaxIndex()
items.= filenames[A_Index] ","
StringLeft, items, items, Strlen(items)-1
msgbox % items
return
MyArray.Push([A_LoopFileFullPath, A_LoopFileTimeModified])
. Also, you're using a deprecated file loop, useLoop, Files
instead. – 0x464e