List files alpabeticaly

By sergarbes

Expert (97)

Аватар пользователя sergarbes

20-04-2021, 11:53

Hello,

I was thinking. FILES list the files on a floppy with the order they have been created. Right? I have been searching to list the files for example, alphabetically. Is that possible? Or It has to be done a BASIC program to achieve that.

Thanks!

Smile Smile Smile

Для того, чтобы оставить комментарий, необходимо регистрация или !login

By NYYRIKKI

Enlighted (5871)

Аватар пользователя NYYRIKKI

20-04-2021, 13:27

I must say MSX-BASIC is pretty limited when it comes to handling files. I would say you need to use BDOS-calls to archieve the result in a compatible way with reasonable effort. This means that at minimum you need to have some assembly routines to support your BASIC program.

From the past I remember also programs like "dirsort" that saves the directory to the order you want (only for floppies) but hard to say if this could be solution to your problem or not..

By Jipe

Paragon (1502)

Аватар пользователя Jipe

20-04-2021, 16:18

By ~mk~

Champion (302)

Аватар пользователя ~mk~

20-04-2021, 17:38

LS.COM from MSX-DOS Tools can do the job

By PingPong

Prophet (3757)

Аватар пользователя PingPong

20-04-2021, 20:23

NYYRIKKI wrote:

I must say MSX-BASIC is pretty limited when it comes to handling files. I would say you need to use BDOS-calls to archieve the result in a compatible way with reasonable effort. This means that at minimum you need to have some assembly routines to support your BASIC program.

From the past I remember also programs like "dirsort" that saves the directory to the order you want (only for floppies) but hard to say if this could be solution to your problem or not..

would be nice to have some kind of basic command like DEF USR=.... A=USR(A$(0)) that fill an array of string each one with the filename on disk, or better
A=USR0(A$) ' find first
A=USR1(A$) ' find next return 0 if endof dir

By sergarbes

Expert (97)

Аватар пользователя sergarbes

21-04-2021, 14:36

Thank you for all your answers MSX mates!

Big smile Big smile Big smile