Though there are many ways to do this including a file sync I see a lot of users wanting to use a bat file to do this and running into issues. Probably because of the familiarity with DOS commands and not scripting syntax, especially KScripting.
The simple script below will let you create a DOS syntax script tfor use with kace to copy a file.
Create a Online Shell Script
Attach a dependency and give the commands like below in the script text
A couple of notes here.
Because the kscript runs as local system you wont run into any permoissions caused by launching your own batch file.
We have simply attached the file to copy as a dependency (in this case AgentErr.png)
Using xcopy withthe path to the script (you can find this by attaching your dependency and saving the script) Find you script in the list you are returned to and hover over it. The link to the script shows the ID, it should aslo be visible inthe address bar like.
The part after ID= will be the number you use in your script.
lastly /y says yes to make sure there is no user interaction required and the /D tells XCOPY that our destination is a directory.