Hi All, would like to copy a folder from a network shared location to a user’s desktop. for example copying \Server\share\Folder1 to c:\users\John Doe\Desktop. I was attempting to use a current user or %userprofile% variable but they fail when I test the action scripts. Here are the scripts that I have been trying to use.
I believe Override Run will only work for the next Run command – you’d need to repeat it:
override run
RunAs=currentuser
run cmd.exe mkdir "%userprofile%\Desktop\Folder XYZ"
override run
RunAs=currentuser
run cmd.exe copy /c "\\server\share\Folder XYZ" "%userprofile%\Desktop\Folder XYZ\" /Y
For this to work the current user will need access to the network share – are you sure that is the case?
Ok, I was able to upload to the wwww site but having some issues copying the folder from __Download to the user desktop location using the %userprofile% variable. On a positive, Strawgate pointed out that I just had to space the two Override commands. The following action is working consistently.
override run
RunAs=currentuser
run cmd.exe mkdir “%userprofile%\Desktop\Folder XYZ”
override run
RunAs=currentuser
run cmd.exe copy /c “\server\share\Folder XYZ” “%userprofile%\Desktop\Folder XYZ” /Y