home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 8 Other / 08-Other.zip / tvfs211.zip / TVSAMPLE.CMD < prev    next >
OS/2 REXX Batch file  |  1995-07-31  |  1KB  |  51 lines

  1. /*REXX*/
  2.  
  3. /*   tvsample.cmd   TVFS sample REXX interface.
  4.  *
  5.  *   (c) Copyright International Business Machines Corporation 1994, 1995.
  6.  *   All rights reserved.
  7.  *
  8.  *   Load the REXX interface via: TvLoadFuncs, TvDropFuncs.
  9.  *   Available TVFS commands are: TvMount, TvUmount, TvLink, TvUlink, TvMkdir.
  10.  *
  11.  *   10.01.93   T.B.Francis   Creation
  12.  *   10.13.93   M.D.Leitch    Incorporated into TVFS.
  13.  */
  14.  
  15. signal on error
  16.  
  17. /* Load the Tv REXX interface. */
  18. call RxFuncAdd 'TvLoadFuncs', 'TVRX', 'TvLoadFuncs'
  19. call TvLoadFuncs
  20.  
  21. /* Mount the virtual drive. */
  22. drive = 'T:'
  23. call TvMount drive
  24.  
  25. /* Link to the virtual drive. */
  26. linkPoint = drive'\OS2.ALL'
  27. links = 'C:\OS2 C:\OS2\SYSTEM C:\OS2\MDOS'
  28. do while links<>''
  29.    parse var links link links
  30.    call TvLink linkPoint link 
  31. end
  32.                     
  33. /* Unlink from the virtual drive. */
  34. call TvUlink linkPoint '*'
  35.  
  36. /* Make a directory (in place of the link). */
  37. call TvMkdir linkPoint
  38.  
  39. /* Unmount the virtual drive. */
  40. call TvUmount drive
  41.  
  42. /* Unload the Tv REXX interface. */
  43. call TvDropFuncs
  44.       
  45. exit(0)
  46.  
  47. error:
  48.    say 'Error processing "' condition('D') "'"
  49.    say 'Return code is' rc
  50.    exit(rc)
  51.