Trouble with rename file via remote process/command

BatchPatch Forums Home Forums BatchPatch Support Forum Trouble with rename file via remote process/command

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #9140
    netman86
    Participant

    Hello!

    I’m evaluating BatchPatch for the ability to execute scripts before and after applying windows updates for the purposes of patching servers running in-house software that doesn’t want to be interrupted by reboots.

    I’m having some trouble with basic functionality, however.

    I’ve created “Remote command 1” and entered the following:

    ren D:pathtofilefilename.txt BatchPatch_filename.txt

    When I execute Remote Command 1, the “all messages” section shows this:

    Wed-10:55:24> Remote Command: Exit Code: 2

    Wed-10:55:24> Remote Command: Executing \$remoteserver -u $mydomain$myusername -p *password* ren D:pathtofilefilename.txt BatchPatch_filename.txt

    Wed-10:55:23> Remote Command: Establishing connection…

    Wed-10:55:23> Remote Command 1: Queued…

    Now, I believe that error code 2 is a “cannot find file” error, but if I copy and paste the command from Remote Command 1 into a cmd shell on $remoteserver, it works fine.

    What am I missing?

    #11019
    netman86
    Participant

    An interesting addendum, if I run the same commands with the Logged Output mode, they work fine.

    Unfortunately, if I try and put these into a job queue, it still fails.

    #9717
    netman86
    Participant

    I now see I can do a (logged output) version and will recreate my tasks this way. Still curious though 🙂

    #9718
    doug
    Moderator

    REN is an internal MS-DS command, as opposed to a stand-alone executable. It can only be run inside of a cmd shell. When you execute ‘Remote Process/Command’ in BatchPatch, under the hood we actually do not load the cmd shell, so REN fails because there is no REN.exe to be found. However, in the case of ‘Remote Process/Command (Logged Output)’ we do load the cmd shell. This is why REN is successful in that case.

    I hope this helps.

    -Doug

    #9719
    netman86
    Participant

    Thank you! That makes perfect sense.

    I’m polishing up my set of scripts and testing them one server at a time- once I get a working process down I’ll be trying four servers from each cluster to make sure it works everywhere before requesting a license.

    Loving this application, thanks for the hard work- and thank you for making the evaluation useful so I can actually make sure it does what I need!

    #9720
    doug
    Moderator

    That sounds like a solid plan. I’m really glad to hear that you’re loving the app and that you find the evaluation version so useful! Thanks for the feedback. We really appreciate it.

    -Doug

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