Hello I am trying to use a batch file to log into a server using plink, go to specific directory and run commands. I can not get this to work. Appreciate any help.
plink -t -ssh [email protected] -pw xxxxx
cd /home/wonderd/public_html/dev.xxxx.com
./shell/indexer.php --reindex catalog_product_price
Instead of scheduling multiple Windows Tasks that may overlap, use the "start /wait" command a batch file (. bat) to automatically run multiple commands in sequential order.
You can run two commands in one line in Windows Command Prompt. For that, you need to create a batch script file using Notepad. Below, we have shared the two best methods to run multiple commands in CMD on Windows 10 computers. Let's check out.
First I think you have to write the machine name or IP after the plink call
The second issue is that plink
run always from root directory so you have to send couple commands together separated by ;
like this :
plink.exe <full name of machine / IP> "command one; command 2"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With