Sort files by date/time.

The place to discuss anything and everything about running your LiveCode on Android

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Googie85
Posts: 226
Joined: Tue Aug 05, 2014 10:07 am

Sort files by date/time.

Post by Googie85 » Thu Jul 17, 2025 1:49 am

Hii Guys!

I have a quick question. Is there a way to sort filenames into Ascending order using the file date/time information?

Thanks,

Googie.

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Sort files by date/time.

Post by Klaus » Thu Jul 17, 2025 3:26 am

Hi Googie,

you can get the LONG files of a folder, which will return an item delimited list with detailed infos.
...
## From the dictionary:
1 Name. The file name is URL-encoded.
To reliably obtain the name use the detailed-utf8 outputKind and decode using the URLDecode function
followed by textDecode. For example, textDecode(URLDecode(item 1 of tLine), "utf8").
2 Size, in bytes. On OS X systems, this is the size of the data fork.
3 Resource fork size, in bytes. (OS X only).
4 Creation date, in seconds. (OS X and Windows only).
5 Last modification date, in seconds.
6 Last access date, in seconds.
7 Last backup date, in seconds.
8 User owner. (Linux and OS X only).
9 Group owner. (Linux and OS X only).
10 Permissions. (Linux and OS X only; see note).
11 Creator and file type. (OS X only).
...
Check the dictionary "files" for further information.

Best

Klaus

Post Reply