How do I create a Robocopy script in KACE SMA?
Hey guys....I'm still learning the SMA but currently we have on our file servers running "Windows Command Scripts" that use Robocopy to copy the local users desktop / documents to a network location in their user backup folders. I'm trying to figure out a way to use KACE to create scripts to do this instead. Has anyone had experience using Robocopy in KACE or is it not supported and is there another / better method?
Thanks!
Answers (2)
Top Answer
You should be able to use Robocopy in an Online Shell Script. Change the script type from Online Kscript to Online Shell Script, and make sure to set it to run as Logged-in user so the environment variables work for the user.
For example, to copy the users desktop, you can enter something like this in the Script Text field:
robocopy %userprofile%\Desktop "\\NetworkPath\Desktop" /MIR
Enter a file name that ends with .bat in the Script File Name field to make it a batch file.
Comments:
-
Thanks for the reply! I'll give your suggestions a shot! - bkieft 2 years ago
-
I got it to run just how you said to try, but if I want to do both Desktop / Documents do I just copy and create a new line same syntax? How would I put a "Wait for completion" between the 2 before the next robocopy command tries to run? I just copied it beneath it but the script isn't showing succeeded but the files look like they copied to both destinations from the correct sources. - bkieft 2 years ago