Search code examples
batch-fileremoting

Updating SVN remotely via batch file


I tried searching relevant threads, it didn't worked. So here are the detailed question / situation, where I am looking for help.

  1. I have 30 client nodes where I have setup SVN and checked out two folders (which needs to be updated) exactly when I want (forcefully).. e.g : "d:\gbv\textures" and "d:\gbv\characters"

  2. then I put svnUpdate.bat file in main d: drive with relevant command e.g: "svn update blabla"

  3. if I run this bat file by double clicking, it works fine ( it updates )

  4. now I thought, I should create a batch file, where I type all 30 nodes IP, and set of commands, to run that batch file from local d: and it should work.

  5. PROBLEM: I am unable to do this.

    • because I am unable to do this, from my cmd panel.
    • because I am not sure, how I can access network pc and tell it to run "d:\svnUpdate.bat" from its drive from dos prompt. ( obviously, I can do this via win explorer visually ).

Hopefully the question will make sense.


Solution

  • You can execute files on remote machines in a network using PsExec. I use it to execute batch files and pass parameters to them.

    You'll probably need the -w option to set the working directory.

    Of course this is a lot easier with powershell remoting, but since you already set it up with batch, PsExec works fine.