Can someone tell me why this won’t work. The delete works great but the copy of the file failes.
// Enter your action script here
delete "C:\program files\splunkuniversalforwarder\etc\system\local\deploymentclient.conf"
copy “D:\downloads\splunk\deploymentclient.conf” “C:\Program Files\SplunkUniversalForwarder\etc\system\local”
This is a task. The file is located on the bigfix server at “D:\downloads\splunk\deploymentclient.conf” and it is copied to C:\Program Files\SplunkUniversalForwarder\etc\system\local.
Be sure to have action uses wow64 redirection false in you script somewhere before the copy, else it may be getting redirected to the x86 folder.
And be sure the Splunk Universal Forwarder service is stopped, it may have an open file lock on the config file.
Oh, I believe you may need the filename in the copy target. I haven’t checked the reference, but by convention I always include both the directory and filename in the copy target.
Could this possibly be the issue since the task is performed on a remote server? the D: drive is on the bigfix server but the C: drive would be on the target server.