home *** CD-ROM | disk | FTP | other *** search
/ High Voltage Shareware / high1.zip / high1 / DIR24 / SAVEINI.ZIP / SAVEINI.TXT < prev   
Text File  |  1993-08-01  |  5KB  |  109 lines

  1.     FileName:  SAVEINI.CMD
  2.     Date:      August 1, 1993
  3.     Author:    Chris Hascall
  4.                49 McKinley Street
  5.                South Portland ME 04106   USA
  6.                1 (207) 799-8679
  7.  
  8.     SAVEINI may be a bit of a misnomer as the title of this REXX program.
  9.     In actuality, I needed a utility which would quickly and efficiently
  10.     create current copies of the five major configuration files required
  11.     within OS/2 ver 2.XX.
  12.  
  13.     Therefore, SAVEINI was created.  I use it on a regular basis to make
  14.     copies of the AUTOEXEC.BAT, CONFIG.SYS, STARTUP.CMD, WIN.INI and SYS-
  15.     TEM.INI files.
  16.  
  17.     One of my objectives was to create copies regularly but to ensure that
  18.     older copies would not be over-written. Using two switches and some
  19.     careful checking, I feel the program accomplishes that end.
  20.  
  21.     SAVEINI will run from an OS/2 CLI as well as from within PMREXX, the
  22.     latter of which is my personal preference.  Program execution. in
  23.     either case is very simple.
  24.  
  25.     Using the following, defined  switches will allow two scenarios.
  26.  
  27.          Switches:    (preceded by a '/' or '-')
  28.  
  29.                   ? - to produce a help "screen"
  30.  
  31.                   A - when present, indicates that prompting is
  32.                       required for alternate file extension
  33.  
  34.                   O - automatically overwrite existing copies
  35.                       without prompting
  36.  
  37.     First, though use of the "O" switch by itself, SAVEINI will do its
  38.     thing with only one interruption.  The user-defined file extension
  39.     is used to create copies and any existing files in the target directory
  40.     will be over-written.
  41.  
  42.     The second switch, "A", when used by itself, will allow interactive
  43.     control to the extent that the user is prompted for an extension
  44.     during execution.  If files already exist, a description of each is
  45.     displayed and the program terminates. This is the safe process.
  46.  
  47.     The command line necessary to execute SAVEINI is simple:
  48.  
  49.               Usage:    SAVEINI <switches>
  50.             Example:    SAVEINI /A /O
  51.  
  52.     To run with PMREXX, the following will do it;
  53.  
  54.                         PMREXX SAVEINI.CMD /A /O
  55.  
  56.     SAVEINI.TXT (continued)
  57.  
  58.  
  59.     In order to get this script going, minor changes are required within
  60.     the "sin_init" procedure.  Several global definitions will need to be
  61.     changed depending on the system in which the program will be run.
  62.  
  63.     Change the following accordingly;
  64.  
  65.         global.save_dir      = "D:\OS2\HOLDINI\"
  66.                                the directory in which the configuration
  67.                                files will be stored.
  68.  
  69.         global.f_extension   = "SAV"
  70.                                the default file extension to be assigned
  71.                                to each file if no override provided via
  72.                                the "/A" option. For HPFS drives, this
  73.                                may be a multi-part name.
  74.  
  75.         global.auto_exec     = "D:\4DOS\AUTOEXEC.BAT"
  76.                                the full path and name of the OS/2
  77.                                autoexec.bat file.
  78.  
  79.         global.config_s      = "D:\CONFIG.SYS"
  80.                                the full path and name of the OS/2
  81.                                config.sys file.
  82.  
  83.         global.start_up      = "D:\STARTUP.CMD"
  84.                                the full path and name of the OS/2
  85.                                startup.cmd file.
  86.  
  87.         global.win_ini       = "F:\OS2\MDOS\WINOS2\WIN.INI"
  88.                                the full path and name of the WINOS2
  89.                                win.ini file.
  90.  
  91.         global.win_sys_ini   = "F:\OS2\MDOS\WINOS2\SYSTEM.INI"
  92.                                the full path and name of the WINOS2
  93.                                system.ini file.
  94.  
  95.     Please feel free to modify SAVEINI as you see fit, but, should you
  96.     encounter any bugs, or come up with any improvements, I would ap-
  97.     preciate receiving your comments, suggestions or changes.
  98.  
  99.     Also, if you will be redistributing SAVEINI, please enclose the or-
  100.     iginal code as well as this text file along with your modified ver-
  101.     sion.
  102.  
  103.     I hope you are able to make use of this short REXX program.  If you
  104.     have any ideas for other utility programs, and perhaps are not a
  105.     "programmer", let me know your ideas and I'll try to put something
  106.     together for you.
  107.  
  108.     chris hascall
  109.