home *** CD-ROM | disk | FTP | other *** search
/ Current Shareware 1994 January / SHAR194.ISO / dos_util / hottip.zip / MCOPY.DOC < prev    next >
Text File  |  1993-08-24  |  2KB  |  63 lines

  1. COPYTO.BAT                  September 1993          Tyler Abbott
  2. MCOPY.BAT                                               Page 293
  3. ----------------------------------------------------------------
  4. Purpose:    Used in batch files, COPYTO, and MCOPY will help you 
  5.             move several files to the same directory without 
  6.             having to continually enter the directory to copy 
  7.             the file to, and will let you set up programs to run 
  8.             on specific days of the week.
  9.  
  10. Syntax:         COPYTO
  11.                 MCOPY
  12.  
  13. COPYTO
  14. Remarks:    DOS lacks an easy way to copy several files to the
  15.             same location at once. Use the example batch file
  16.             below to copy as many files as you want into one
  17.             directory.
  18.  
  19.                 @ECHO OFF
  20.                 SET DESTDIR=%1
  21.                 :START
  22.                 SHIFT
  23.                     IF "%1" == "" GOTO END
  24.                 COPY %1 %DESTDIR%
  25.                 GOTO START
  26.                 :END
  27.  
  28. MCOPY       To run the program, type COPYTO followed by the
  29. Remarks:    destination directory and the list of files you
  30.             want to copy. For example, the command line
  31.  
  32.                 COPYTO C:\TEMP *.BAK DELETE.DOC EXTRA.WP
  33.  
  34.             copies all BAK files, DELETE.DOC, and EXTRA.WP
  35.             to the TEMP directory on C:.
  36.  
  37. Syntax:         MCOPY            
  38.             
  39.             To avoid COPYTO's backward destination-first
  40.             syntax, create this batch file (called MCOPY)
  41.             that lets you copy using a more familiar DOS 
  42.             syntax.
  43.  
  44.                 @ECHO OFF
  45.                 SET COPYLIST=
  46.                 :START
  47.                 IF "%2" == "" GOTO END
  48.                 SET COPYLILST=%COPYLIST% %1
  49.                 SHIFT
  50.                 GOTO START
  51.                 :END
  52.                 SET DESTINATION=%1
  53.                 COPYTO %DESTINATION% %COPYLIST%
  54.  
  55.             To use the batch file program, type MCOPY
  56.             followed by the files you want to copy and the 
  57.             destination directory. For example, the following
  58.             command copies the same files as the COPYTO command
  59.             line above:
  60.  
  61.                 MCOPY *.BAK DELETE.DOC EXTRA.WP C:\TEMP
  62.  
  63.