home *** CD-ROM | disk | FTP | other *** search
/ ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng) / ProfitPress-MegaCDROM2.B6I / PROG / BASIC / PBCLON16.ZIP / VARCDEMO.BAS < prev    next >
Encoding:
BASIC Source File  |  1991-09-21  |  1.3 KB  |  40 lines

  1. '   +----------------------------------------------------------------------+
  2. '   |                                                                      |
  3. '   |       PBClone  Copyright (c) 1990-1991  Thomas G. Hanlin III         |
  4. '   |                                                                      |
  5. '   +----------------------------------------------------------------------+
  6.  
  7. ' This is another simple demo of the PBClone routines.  It allows you to
  8. ' view the files in an archive (.ARC, .LZH, .PAK, or .ZIP).
  9. ' Typically, this would be converted to an .EXE file using these steps:
  10. '    BC VARCDEMO/O;
  11. '    LINK VARCDEMO/EX,,NUL,PBCLONE;
  12.  
  13.    DECLARE SUB CloseA ()
  14.    DECLARE SUB FindFirstA (Archive$, FileName$, ErrCode%)
  15.    DECLARE SUB FindNextA (ErrCode%)
  16.    DECLARE SUB GetNameA (FileName$, FileNameLen%)
  17.  
  18.    DEFINT A-Z
  19.  
  20.    Arc$ = LTRIM$(RTRIM$(COMMAND$))
  21.    IF LEN(Arc$) = 0 THEN
  22.       PRINT "Please specify the name of an archive."
  23.       END
  24.    END IF
  25.  
  26.    FindFirstA Arc$, "*.*", ErrCode
  27.    IF ErrCode THEN
  28.       PRINT "Unable to open specified archive."
  29.       END
  30.    END IF
  31.  
  32.    FileName$ = SPACE$(12)
  33.    DO
  34.       GetNameA FileName$, FLen
  35.       PRINT LEFT$(FileName$, FLen); SPACE$(16 - FLen);
  36.       FindNextA ErrCode
  37.    LOOP UNTIL ErrCode
  38.  
  39.    CloseA
  40.