>順番にならべることはできますか?
……普通にソートしたらいいんじゃね?
#include "hspext.as"
#module
#defcfunc ftime str filename,int opt
dim time,24
fxtget@ time,filename
sdim dat,1024
dat=strf("%04d/%02d/%02d %02d:%02d:%02d.%03d",time(8*opt),time(8*opt+1),time(8*opt+3),time(8*opt+4),time(8*opt+5),time(8*opt+6),time(8*opt+7))
return dat
#global
timeopt=0 ;0〜2が作成日・更新日・最終アクセス日に対応
compopt=0 ;0なら昇順、1なら降順
sdim filelist,32000
dirlist filelist,"*.*",1
filenum=stat
sdim filename,260,filenum
notesel filelist
repeat filenum
noteget getline,cnt
filename(cnt)=getline
loop
sdim tmp,260
for i,0,filenum-1
for j,i+1,filenum
a=ftime(filename(i),timeopt)
b=ftime(filename(j),timeopt)
if (1-2*compopt)*(a!b)>0 {
tmp=filename(i)
filename(i)=filename(j)
filename(j)=tmp
}
next
next
sdim output,32000
repeat filenum
output+=filename(cnt)+"\t"+ftime(filename(cnt),timeopt)+"\n"
loop
mesbox output,400,400,4
stop