home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / utils / s-river.zip / GOODIES.DOC < prev    next >
Text File  |  1986-02-14  |  1KB  |  46 lines

  1. Here are some programs to make your batch files better.
  2.  
  3. XDOS  calls another batch file from within a batch file, executes
  4. the called batch file and returns to the next line after the XDOS
  5. statement.  XDOS invoked batch files may themselves contain  XDOS
  6. statements.
  7.  
  8.     SAMPLE prog1        (sample command)
  9.     
  10.  
  11.     SAMPLE.BAT:
  12.  
  13.     (other dos commands)
  14.     XDOS DOASM %1        (calls DOASM batch file and returns)
  15.     (other dos commands)
  16.  
  17.  
  18.     DOASM.BAT:        (edit, assemble and display output)
  19.  
  20.     COPY %1.asm %1.bak    (backup file)
  21.     XDOS EDIT %1.asm    (call procedure to edit file)
  22.     XDOS ASM %1        (call procedure to assemble file)
  23.     XDOS LINKIT %1.obj    (call procedure to link file)
  24.  
  25.  
  26. PUSHD pushes the current directory onto a stack and establishes a
  27. new current directory.
  28.  
  29. POPD  pops  a  directory  off  the stack and makes it the current
  30. directory.
  31.  
  32. Posit: you want to execute an editor from any directory; but, the
  33. editor  only  edits files in its own directory.  In addition, you
  34. want to have only one copy of the editor and the batch file  that
  35. calls it.
  36.  
  37.     EDIT.BAT:         (called in above procedure)
  38.  
  39.     COPY %1 \editdir     (copy file from current dir to edit dir)
  40.     PUSHD \editdir       (save current dir; est \EDITDIR as new cur dir)
  41.     XEDIT %1             (edit file within \EDITDIR)
  42.     POPD             (restore original dir)
  43.     COPY \editdir\%1     (copy edited file back to original dir)
  44.     DEL \editdir\%1      (remove working copy from \EDITDIR)
  45.  
  46.