I know there is example four of - https://autohotkey.com/docs/commands/LoopFile.htm - to do this but this does not allow me to use %A_LoopFileName%, %A_LoopFileLongPath% etc because they are in a Parse Loop not File Loop.
How do I get that information inside the Parse loop?
Sort By Date Modified Topic is solved
Re: Sort By Date Modified
an example
Code: Select all
#warn
e4x:=""
e:=""
f1=%a_scriptdir%\ByDateSorted_txt.txt
ifexist,%f1%
filedelete,%f1%
setworkingdir,%a_scriptdir%
fd1=%a_desktop%
Loop, %fd1%\*.txt, 0, 1
e4x .= A_LoopFileTimeModified . ";" . A_LoopFileFullPath "`r`n"
Sort, e4x ;- Sort by date.
Loop, Parse,e4x, `n,`r
{
x=%a_loopfield%
if x=
continue
stringsplit,C,x,`;
e .= c2 . "`r`n"
}
Fileappend,%e%,%f1%
run,%f1%
exitapp
Who is online
Users browsing this forum: No registered users and 237 guests