BBS: Inland Empire Archive Date: 02-27-93 (18:27) Number: 320 From: DICK DENNISON Refer#: NONE To: EVERYONE Recvd: NO Subj: Volume label Conf: (2) Quik_Bas
'Someone was looking for code to get the Volume Label last week: DECLARE SUB findfile () '$INCLUDE: 'qb.bi' 'Dick Dennison 1:272/34 8/23/92 Public domain findfile SUB findfile DIM regs AS regtypex DIM dta AS STRING * 44 Filespec$ = "*.*" Temp$ = Filespec$ + CHR$(0) 'Must be AsciiZ regs.ax = &H1A00 'DOS service to set DTA regs.ds = VARSEG(dta) regs.dx = VARPTR(dta) CALL INTERRUPTX(&H21, regs, regs) regs.ax = &H4E00 'Find first matching file regs.cx = 8 'volume label regs.ds = VARSEG(Temp$) regs.dx = SADD(Temp$) CALL INTERRUPTX(&H21, regs, regs) IF regs.flags AND 1 THEN END FOR x% = 30 TO 42 a$ = CHR$(PEEK(VARPTR(dta) + x%)) IF a$ = CHR$(0) THEN EXIT FOR 'Parse for AsciiZ PRINT a$; NEXT x% END SUB end --- VP [DOS] V4.09e * Origin: The MailMan (914)374-3903 NY Quick Share Pt #7 *HST (1:272/34)
Books at Amazon:
Back to BASIC: The History, Corruption, and Future of the Language
Hackers: Heroes of the Computer Revolution (including Tiny BASIC)
Go to: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Scientists and Iconoclasts who were the Hero Programmers of the Software Revolution
The Advent of the Algorithm: The Idea that Rules the World
Moths in the Machine: The Power and Perils of Programming
Mastering Visual Basic .NET