Execute batch script on remote computer

P

py

I am trying to execute a batch script on a remote computer.

The batch script looks like:

@echo off
start c:\python24\python.exe c:\a_script.py


Here's the setup:
Computer A (my computer), Computer B (the remote computer).

So I map "W:" to Computer B and then copy the batch script to Computer
B. Then from within Python on Computer A I run:
import subprocess
subprocess.Popen("W:\\foo.bat")

However, when it runs it says it can't find c:\a_script.py. It seems
to be trying to look
at Computer A, not Computer B. How can I do this?

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top