BatchPatch Forums Home › Forums › BatchPatch Support Forum › How to use $computer ?
- This topic has 3 replies, 2 voices, and was last updated 12 years, 7 months ago by doug.
-
AuthorPosts
-
March 21, 2013 at 5:55 pm #8596AndiParticipant
Hi
i like to use the “Local Process/Command” to copy some files to our workstations.
My command is:
xcopy “\$computersharesbmgop2shortcutsbmgop 2.lnk” \$computerc$userspublicdesktop
This doesn’t work. Nothing is copied and i dont get any error message back.
When i use the Computername instead of $computer, everything works fine:
xcopy “\Computernamesharesbmgop2shortcutsbmgop 2.lnk” \Targetcomputernamec$userspublicdesktop
what did i do wrong ?
thanks
March 22, 2013 at 1:29 am #9508dougModeratorHi Andi – you found a bug, which is now fixed in the 2013.3.21.20.10 build I just published a few minutes ago.
However, even though there was a bug in the software, you might still consider an alternate way of accomplishing what you’re trying to do.
In the way you’ve described doing this, you would end up copying the file from a network file share, down through your computer running BatchPatch, and then up to the target computer location. This will work fine, but for large files it might not be ideal to have your computer act as a middle-man for the file transfer, especially if you’re trying to do this for many target computers at once.
Instead you might consider using the “Remote Script/Process” with a command like this:
xcopy \someNetworkSharefolderfile.txt c:folderOnTargetComputer
This will execute the xcopy command on the target computer instead of the local computer running BatchPatch. So, the target computer will then directly reach out to the network share and copy the file back to itself, without the file ever having to be pulled through the computer running BatchPatch.
Hope this helps.
-Doug
March 22, 2013 at 9:19 am #9509AndiParticipantHi doug
works great now ! outstanding support. I tried before with xcopy Remote Script/Process but had no luck. i tried also manualy from the command line with psexec but always get the error: xcopy quit with error 4 there is no valid target drive. i have to further investigate that. That’s not a bug BachtPatch.
Anymway, thanks a lot for you support and thanks for BatchPatch. I use it almost everyday.
March 22, 2013 at 2:27 pm #9510dougModeratorYou’re welcome Andi. I’m real happy to hear that you like the tool!
-Doug
-
AuthorPosts
- You must be logged in to reply to this topic.