home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Current Shareware 1994 January
/
SHAR194.ISO
/
dos_util
/
hottip.zip
/
MCOPY.DOC
< prev
next >
Wrap
Text File
|
1993-08-24
|
2KB
|
63 lines
COPYTO.BAT September 1993 Tyler Abbott
MCOPY.BAT Page 293
----------------------------------------------------------------
Purpose: Used in batch files, COPYTO, and MCOPY will help you
move several files to the same directory without
having to continually enter the directory to copy
the file to, and will let you set up programs to run
on specific days of the week.
Syntax: COPYTO
MCOPY
COPYTO
Remarks: DOS lacks an easy way to copy several files to the
same location at once. Use the example batch file
below to copy as many files as you want into one
directory.
@ECHO OFF
SET DESTDIR=%1
:START
SHIFT
IF "%1" == "" GOTO END
COPY %1 %DESTDIR%
GOTO START
:END
MCOPY To run the program, type COPYTO followed by the
Remarks: destination directory and the list of files you
want to copy. For example, the command line
COPYTO C:\TEMP *.BAK DELETE.DOC EXTRA.WP
copies all BAK files, DELETE.DOC, and EXTRA.WP
to the TEMP directory on C:.
Syntax: MCOPY
To avoid COPYTO's backward destination-first
syntax, create this batch file (called MCOPY)
that lets you copy using a more familiar DOS
syntax.
@ECHO OFF
SET COPYLIST=
:START
IF "%2" == "" GOTO END
SET COPYLILST=%COPYLIST% %1
SHIFT
GOTO START
:END
SET DESTINATION=%1
COPYTO %DESTINATION% %COPYLIST%
To use the batch file program, type MCOPY
followed by the files you want to copy and the
destination directory. For example, the following
command copies the same files as the COPYTO command
line above:
MCOPY *.BAK DELETE.DOC EXTRA.WP C:\TEMP