Plink batch file - Problem sending commands
From: Nigel Butler (nigel.butler_at_talk21.com)
Date: 08/31/04
- Next message: Richard E. Silverman: "Re: Plink batch file - Problem sending commands"
- Previous message: arvidjaar: "Tunneling UDP over SSH (with PuTTY)?"
- Next in thread: Richard E. Silverman: "Re: Plink batch file - Problem sending commands"
- Reply: Richard E. Silverman: "Re: Plink batch file - Problem sending commands"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: 31 Aug 2004 03:06:39 -0700
I have successfully created a batch file to connect to a remote Unix
computer using Plink from a windows PC.
Once connected I want the batch file to send some commands to the
remote computer to change the directory and to start analysis on a
certain file.
The batch file I am using is as follows:
__________________________________
cd C:\Plink
plink username@computer.com -pw mypassword
__________________________________
This connects fine, and I can then type my commands by hand into the
CMD window ...
cd dirname ... change the Dir
abq641 job=jobname input=jobname... run the analysis
all works fine. However I am trying to get the batch file to execute
these commands for me, but I cannot get it to work. I have tried the
following
__________________________________
cd C:\Plink
plink username@computer.com -pw mypassword
cd scratch
abq641 job=jobname input=jobname
__________________________________
but this does not execute the commands, it logs in fine and then stop
after the second line.
I have also tried
__________________________________
cd C:\Plink
plink username@computer.com -pw mypassword -batch cd scratch
abq641 job=jobname input=jobname
__________________________________
but this does not even log in... it just closes the CMD window.
All works fine if I type the command in by hand, but I cannot get the
batch file to do it for me!! Please can any one offer me any help or
advice in this matter.
Regards
Nigel
- Next message: Richard E. Silverman: "Re: Plink batch file - Problem sending commands"
- Previous message: arvidjaar: "Tunneling UDP over SSH (with PuTTY)?"
- Next in thread: Richard E. Silverman: "Re: Plink batch file - Problem sending commands"
- Reply: Richard E. Silverman: "Re: Plink batch file - Problem sending commands"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|
|