home *** CD-ROM | disk | FTP | other *** search
/ Tactical Operations 2 / TACTICAL2.bin / COMMAND / CSINGLE / CCLAU203.ZIP / PROPATHS.ZIP / TUTORIAL.TXT < prev   
Encoding:
Text File  |  1995-06-14  |  5.6 KB  |  143 lines

  1. ------------------------------------------------------------------------------
  2.  
  3.                              GetPaths and SetPaths
  4.  
  5.                                   Version 2.0
  6.  
  7.            Copyright (c) 1995, Jacob Pedersen, PROWESS DEVELOPMENTS
  8.  
  9.  
  10.                                  Tutorial File
  11.  
  12. ------------------------------------------------------------------------------
  13.  
  14.     Table of contents:
  15.  
  16.       What GetPaths and SetPaths can do for you.........................1.0.
  17.       Copyright and ShareWare information...............................1.1.
  18.       Why these 'commands'?.............................................1.2.
  19.       Changes since first version.......................................1.3.
  20.  
  21.       How to do.........................................................2.0.
  22.       Extra parameters..................................................2.1.
  23.         The syntax of the two commands..................................2.11.
  24.         The extra parameters............................................2.12.
  25.         Possible combinations...........................................2.13.
  26.  
  27. ------------------------------------------------------------------------------
  28.  
  29. 1.0 What GetPaths and SetPaths can do for you.
  30.  
  31.       The zip-file consists of three files, GetPaths.EXE, SetPaths.EXE and
  32.      Tutorial.TXT. GetPaths.EXE stores the path of all logical drives and the
  33.      current drive in a specified file. SetPaths.EXE restores the paths and
  34.      changes the drive to stored drive and deletes the file. Tutorial.TXT,
  35.      the file you are now reading, is a tutorial which shows you how to use
  36.      these 'commands' in your batch-program.
  37.  
  38. 1.1 Copyright and ShareWare information.
  39.  
  40.       This is a shareware product. You have my specific permission to copy
  41.      and distribute this package as long as all files remain intact and
  42.      unchanged. If you benefit from this tutorial, or if you use the EXE-files
  43.      in your programs you are expected to register.
  44.  
  45.       To register, send $05.00, £03.00 or DKK 30.00 to:
  46.  
  47.                               PROWESS DEVELOPMENTS
  48.                                  Jacob Pedersen
  49.                                 Helligkorsvej 79
  50.                                  4000  Roskilde
  51.                                     Denmark
  52.  
  53. 1.2 Why these 'commands'?
  54.  
  55.       GetPaths and SetPaths was developed, because I found it necessary to be
  56.      able, in a batch-program, to f.i change drive(s) and/or path(s) and then
  57.      later restore the original drive and paths!
  58.  
  59.       If you have any ideas or anything you want to tell me, then feel free
  60.      to send a postcard or a letter!
  61.  
  62. 1.3 Changes since first version.
  63.  
  64.     Version:
  65.      1.0  Stored current drive and path.
  66.      2.0  Stores paths of all logical drives and the current drive.
  67.           Names of commands changed to GetPaths and SetPaths as they now
  68.           stores more than one path.
  69.  
  70. ------------------------------------------------------------------------------
  71.  
  72. 2.0 How to do:
  73.  
  74.       Here is an example of a program you can write:
  75.  
  76.       @echo off
  77.       [drive+path] GetPaths C:\PPATH.TMP NOTA
  78.  
  79.       c:
  80.       cd \CDPLAYER
  81.       PLAYCD.COM
  82.  
  83.       call WIN.BAT
  84.  
  85.       [drive+path] SetPaths C:\PPATH.TMP
  86.  
  87.  
  88.       The fictive CD-player is able to store data about CD's, but keeps it's
  89.      database in the current directory. By using this simple batch-program you
  90.      are able to execute the CD-player from any drive and any path, and only
  91.      have one database!!! (Note: NOTA is left out from the SetPaths line,
  92.      because the path of drive A is not stored therefor SetPaths woun't try to
  93.      restore it!)
  94.       After working under WINDOWS, we have probably changed a lot of paths and
  95.      when we exit WINDOWS we will forsure end up in the WINDOWS directory.
  96.      Quite annoying, but SetPaths fixes all our problems and we are back where
  97.      we started!!!
  98.  
  99.       This is just one way to the GetPaths and SetPaths commands.
  100.      You figure out how you can use them in your programs!
  101.  
  102. 2.1 Extra parameters.
  103.  
  104.  2.11 The syntax of the two commands:
  105.  
  106.         GetPaths <[drive+path] filename> (NOTA/B) (NOTB)
  107.         SetPaths <[drive+path] filename> (NOTA/B) (NOTB)
  108.  
  109.  2.12 What the extra parameters means:
  110.  
  111.         GetPaths: NOTA/B. You can tell GetPaths not to store information about
  112.                           drive A or B.
  113.                   NOTB.   If you chose NOTA before you can add a third
  114.                           parameter to exclude drive B too.
  115.  
  116.         SetPaths: NOTA/B. IF you stored the paths of drive A or B, you can
  117.                           choose NOT to restore the path again.
  118.                   NOTB.   If you chose NOTA before you can add a third
  119.                           parameter to exclude the path of drive B from being
  120.                           restored too.
  121.                           
  122.                   Both.   Notice that you don't have to specify any of these
  123.                           parameters if you used them in GetPaths!
  124.  
  125.         Note:  If you don't have a drive B, you don't have to specify it at
  126.               all! GetPaths will check if a disk is present in any of the
  127.               floppy-drives!
  128.  
  129.  2.13 Possible combinations.
  130.  
  131.         If the last section was a little hard to understand, here are the
  132.        possible combinations:
  133.  
  134.          GetPaths <filename>
  135.          GetPaths <filename> NOTA
  136.          GetPaths <filename> NOTB
  137.          GetPaths <filename> NOTA NOTB
  138.  
  139.          SetPaths <filename>
  140.          SetPaths <filename> NOTA
  141.          SetPaths <filename> NOTB
  142.          SetPaths <filename> NOTA NOTB
  143.