home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-387-Vol-3of3.iso / d / dsharp10.zip / BATS.DOC < prev    next >
Text File  |  1993-01-24  |  3KB  |  87 lines

  1.                  BATCH FILES IN THIS COLLECTION
  2.  
  3. Of the many batch files I have, I find I use these the most.  
  4. They will display their function and syntax if their names are 
  5. entered with no arguments.
  6.  
  7. COPY?.BAT
  8.  
  9.      These copy a list of files from the current directory to 
  10.      the drive that replaces the "?" in the file name.
  11.      
  12. DELX.BAT
  13.      
  14.      Extends your DEL command to take a list of files to delete.
  15.      
  16. SHO.BAT
  17.      
  18.      Feeds multiple files to SHOW.COM, one after the other.
  19.      
  20. DO.BAT
  21.      
  22.      A generalization of the above.  An alternative to the FOR 
  23.      loop for doing multiple operations.  Some operations are 
  24.      much easier with DO, or possible only with DO.  For example 
  25.      to copy FILE1, FILE2, MY.FIL and LONGFILE.TXT from the 
  26.      current directory to \TMP, enter:
  27.      
  28.           DO copy \tmp FOR file? my.fil longfile.txt
  29.      
  30.      Having said that, some operations are easier with the FOR 
  31.      construct.  In a sense DO turns the order of the normal 
  32.      batch FOR and DO operators around and has a much easier 
  33.      syntax.
  34.  
  35. HERE.BAT  (Much improved version by Alan Dawson)
  36.  
  37.      Marks your place in the disk for a quick return.  Useful 
  38.      when you are in some complex directory and want to go 
  39.      elsewhere and return to it without typing some long 
  40.      directory name.
  41.      
  42.      Just say "HERE" to remember the current drive and 
  43.      directory, and you can return to it with the "RET" command.
  44.      
  45.      If you end your AUTOEXEC.BAT with
  46.      
  47.           IF EXIST RET.BAT RET
  48.      
  49.      then after any reboot you will wind up in the drive and 
  50.      directory where you last said "HERE."
  51.  
  52.      RET will also accept a command in the form RET COMMAND.
  53.      It will change to the directory and then execute the 
  54.      command.
  55.  
  56.      Examples: RET CLS, RET WP MYDOC
  57.  
  58. APATH.BAT
  59.  
  60.      A simple path manipulator.  APATH NEWDIRECTORY will 
  61.      append NEWDIRECTORY to your path.  APATH with no argument 
  62.      will restore your original path.  If a directory has 
  63.      already been appended by APATH, the command APATH 
  64.      NEWDIRECTORY will change the appended directory.
  65.  
  66.      If your original path is
  67.           C:\WINDOWS;C:\DOS;C:\WP
  68.      then the command APATH C:\TMP will make it
  69.           C:\WINDOWS;C:\DOS;C:\WP;C:\TMP
  70.      If you now type APATH C:\TEST your path will become
  71.           C:\WINDOWS;C:\DOS;C:\WP;C:\TEST
  72.      If you type only APATH your path will be restored to
  73.           C:\WINDOWS;C:\DOS;C:\WP
  74.  
  75.      It is instructive to trace this one with CMON.  You'll see 
  76.      how to make variants that prepend a directory, etc. (This 
  77.      was actually an example made for a course some years ago.)
  78.      
  79. SOUNDS.BAT
  80.  
  81.      Drives BEEPER.COM with "clip" sounds.  See BEEPER.DOC.
  82.  
  83. COLORS.BAT
  84.  
  85.      Shows ANSI color attributes.  Useful with ESCAPE.COM.
  86.      (Needs ANSI.SYS or similar.)
  87.