I was looking into this myself recently, and this is what I came up with
FileNo = FREEFILE
SHELL "dir > c:\ZFileDir.tmp"
OPEN "C:\ZFileDir.tmp" FOR INPUT ACCESS READ LOCK READ WRITE AS FileNo
DO
LINE INPUT #FileNo, FileInfo$
LOOP UNTIL INSTR(FileInfo$, "Directory of ") > 1
KILL "C:\ZFileDir.tmp"
What happens is this :-
Line starting SHELL gets a directory listing and puts it into the file. The top part of mine looks like this :-
Volume in drive C is BRISRAY <br> Volume Serial Number is 123A-4BC3
Directory of C:\QBASIC
. <DIR> 10/03/01 12:21a
.. <DIR> 10/03/01 12:21a
40LBS BAS 8943 01/22/00 11:15a
ABSCALL2 BAS 3661 07/31/95 4:00p
ALTVAL BAS 720 04/15/99 10:36a
.........
.........
The loop reads down to the line Directory of C:\QBASIC, when it exits the loop it leaves FileInfo$ as that text. You can then extract the directory information.
Ray