I have a folder in c drive,whicn contain 1000 txt file,i want to get the list of all these txt file. How can i get this list?
+5
A:
Use the OS-DIR()
function.
For example:
DEFINE STREAM dirlist.
DEFINE VARIABLE filename AS CHARACTER FORMAT "x(30)" NO-UNDO.
INPUT STREAM dirlist FROM OS-DIR(".").
REPEAT:
IMPORT STREAM dirlist filename.
DISPLAY filename.
END.
INPUT CLOSE.
Dave Webb
2009-08-21 09:01:00