Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
FILEATTR Function Programming Example
◄Example► ◄Contents► ◄Index► ◄Back►
──────────────────────────────────────────────────────────────────────────────
'This example uses the FILEATTR function to get the handles and modes from
'two opened files using the PRINT statement to print out the DOS file.
OPEN "tempfile.dat" FOR APPEND AS #1
OPEN "tempfl2.dat" FOR RANDOM AS #2
PRINT "Number Handle Mode"
PRINT TAB(2);1;TAB(10);FILEATTR(1,2);TAB(15);FILEATTR(1,1)
PRINT TAB(2);2;TAB(10);FILEATTR(2,2);TAB(15);FILEATTR(2,1)
END
'
'Sample Output
'
'Number Handle Mode
' 1 5 8
' 2 6 4