How to use $computer ?

BatchPatch Forums Home Forums BatchPatch Support Forum How to use $computer ?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #8596
    Andi
    Participant

    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

    #9508
    doug
    Moderator

    Hi 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

    #9509
    Andi
    Participant

    Hi 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.

    #9510
    doug
    Moderator

    You’re welcome Andi. I’m real happy to hear that you like the tool!

    -Doug

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.