# Solved: Simple Copy script



## redmonkie (Nov 4, 2008)

On my Windows Server 2008 R2 machine I'm trying to copy a file from one directory and replace/overwrite the existing file in another directory. So my idea was to right a batch script and put it into task scheduler to run every hour.

The batch file script:
copy <P:\folder1>\index.html <P:\folder2>
before I put it into the task scheduler I tested it to see if it works and in command prompt I get this error:
The syntax of the command is incorrect.

Any ideas why this doesn't work? Also will it automatically overwrite the existing file? When you do it manually you normally get a pop up box asking if you want to replace/copy.

Many thanks in advance.


----------



## Squashman (Apr 4, 2003)

I assume you figured out what the redirection symbols were doing.


----------

