home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / alt / msdos / programm / 2703 < prev    next >
Encoding:
Internet Message Format  |  1992-11-10  |  1.6 KB

  1. Path: sparky!uunet!vtserf!csugrad!ceharris
  2. From: ceharris@csugrad.cs.vt.edu (Carl Harris)
  3. Newsgroups: alt.msdos.programmer
  4. Subject: Re: Stat-ing a Directory file
  5. Message-ID: <BxIvF5.Ao6@csugrad.cs.vt.edu>
  6. Date: 10 Nov 92 22:49:53 GMT
  7. References: <BxGsCA.Lnu@fang.att.com>
  8. Organization: Virginia Tech Computer Science Dept, Blacksburg, VA
  9. Lines: 28
  10. X-Newsreader: Tin 1.1 PL4
  11.  
  12. pheffner@fang.att.com (Paul Heffner) writes:
  13. : Anyone out there know a way of obtaining the size and time/date
  14. : information of a MS-DOS directory file using standard DOS calls
  15. : under MASM? For a regular file, you can use Int 21, function 5700
  16. : to get the time and date of an open file using its handle, likewise
  17. : you can use the old seek-to-end trick to get the file size, but both 
  18. : of these require an open file handle to work, and you can't open a
  19. : directory file like in Unix (or can you?). The MS C stat function
  20. : goes as far as returning what seems to be a good set of timestamp
  21. : information, so I guess it's there for using if you know how to get
  22. : it. (Or does that function resort to sneaky non-standard methods
  23. : to get the info?) All input would be appreciated!
  24. : Thanks!
  25. : Heff
  26.  
  27.  
  28. You can open a directory just like any other file, and read the time
  29. and date stamp of any file there in.  The format is the same as that used
  30. in the root directory.
  31.  
  32. -- 
  33. +---------------+---------------------------------------------------+
  34. | Carl Harris   |program (tv).  To engage in an activity similar to |
  35. | CS @ VA TECH  |banging one's head against a wall, but with fewer  |
  36. |               |opportunities for reward.                          |
  37.