i have this code
Code: Select all
SetWorkingDir, %A_ScriptDir%
FileList := "File Name,TimeLastModified"
Loop, %A_ScriptDir%\*.*
{
FormatTime, last_time_modified, %A_LoopFileTimeModified%, MM/dd/yyyy hh:mm:ss
FileList .= "`n" . A_LoopFileName . "," . last_time_modified
}
FileAppend,%FileList%,FileList.csv
Run, excel.exe "FileList.csv"
for more details :
I wrote also this code this work Well, but in this way should i click at cell "A1" and click at F1 to paste file name and like this for TimeLastModified should i click at "B1" cell then click at F2 and so on, i think there are Better way to do that .
Code: Select all
SetWorkingDir, %A_ScriptDir%
FileList := "Base name,TimeLastModified"
Loop, %A_ScriptDir%\*.*
{
FormatTime, last_time_modified, %A_LoopFileTimeModified%, MM/dd/yyyy hh:mm:ss
FileName .= "`n" . A_LoopFileName
FileDate .= "`n" . last_time_modified
}
f1:: send , % FileName
f2:: send , % FileDate
this is My last attempts:
Code: Select all
setWorkingDir, %A_ScriptDir%
FileList := "Base name,TimeLastModified"
Loop, %A_ScriptDir%\*.*
{
FormatTime, last_time_modified, %A_LoopFileTimeModified%, MM/dd/yyyy hh:mm:ss
FileName .= "`n" . A_LoopFileName
FileDate .= "`n" . last_time_modified
}
Xl := ComObjCreate("Excel.Application")
Xl.Visible := True ;by default excel sheets are invisible
Xl.Workbooks.Add ;add a new workbook
Xl.Range("A1").Value := FileName ;Send clipboard to selected cell
Xl.Range("B1").Value := FileDate ;Send clipboard to selected cell