Copy Command batch file

Associate
Joined
5 Feb 2006
Posts
129
Location
Birmingham
I am struggling with the copy command in a batch file i want co copy a file to another directiory to overwrite a file

the file i want to move is in the same directory as the batch file

COPY file.exe c:\Program Files\folder\

This dose not work any sugestions
 
copy /Y file.exe "C:\Program Files\folder\file.exe"

or

copy /Y file.exe "%programfiles%\folder\file.exe"


the /Y makes it overwrite


if you open a cmd prompt, then type "copy /?" it'll tell you other switches :)
 
Back
Top Bottom