How do I use the COPY command?
Hi guys. I'm trying to make a batch file which will replaces files in another directory.
There already is the REPLACE command, but you need to specify both sources rather than just the destination.
The only idea that I can come up with is to COPY the files to %windir%/system32 first, then REPLACE the files that I want.. but I am trying to avoid having a middle step.
@ECHO off
ECHO Replacing File...
REPLACE C:\log.txt "C:\Program Files\SysLog\"
ECHO Done
PAUSE
Hi guys. I'm trying to make a batch file which will replaces files in another directory.
There already is the REPLACE command, but you need to specify both sources rather than just the destination.
The only idea that I can come up with is to COPY the files to %windir%/system32 first, then REPLACE the files that I want.. but I am trying to avoid having a middle step.
@ECHO off
ECHO Replacing File...
REPLACE C:\log.txt "C:\Program Files\SysLog\"
ECHO Done
PAUSE
Last edited: