FILEATTR Gets MS-DOS File Handle to Get File Date/Time Stamp (38492)
The information in this article applies to:
- Microsoft QuickBASIC 4.0
- Microsoft QuickBASIC 4.0b
- Microsoft QuickBASIC 4.5
- Microsoft BASIC Compiler for MS-DOS and OS/2 6.0
- Microsoft BASIC Compiler for MS-DOS and OS/2 6.0b
- Microsoft Basic Professional Development System for MS-DOS 7.0
This article was previously published under Q38492 SUMMARY
When you open a file with the OPEN statement in a compiled Basic
program, the file number that you give is not the MS-DOS file handle.
Instead, the file number acts as a pointer into an internal table that
Basic uses to hold the file handles. You can use the FILEATTR function
to obtain the actual MS-DOS file handle.
The syntax for getting the file handle is as follows:
FILEATTR(filenumber, 2)
The program example below shows how to obtain the MS-DOS file handle
of a file using the FILEATTR function. The program then uses the file
handle in an MS-DOS INTERRUPT call to return the file's date and time
stamp.
This information applies to Microsoft QuickBasic Versions 4.00, 4.00b,
and 4.50, to Microsoft Basic Compiler Versions 6.00 and 6.00b for
MS-DOS, and to Microsoft Basic Professional Development System (PDS)
Version 7.00 for MS-DOS.
Modification Type: | Minor | Last Reviewed: | 8/16/2005 |
---|
Keywords: | KB38492 |
---|
|