Error running a windows .bat file

Hi, I am a new user and am seeing what I can do with an external script. I have tried a very simple example for ssh to a remote linux device.

My relay_control.bat file only contains:

ssh pi@192.168.0.123 “sudo python relay_togg.py”

I get a ssh is not a recognised internal or external command, operable program or batch file. If I fully path ssh, or include %SystemPath%\ssh, use full name ssh.exe.

If I enter the above into a cmd window it works fine.

I have obviously missed something very simple so advice will be greatly appreciated.

I resolved this by copying the ssh executable to the user directory containing the bat file and it works. There is still a problem resolving the system paths but I will leave that for another day.