1

I have a web server that only I use running on my windows machine, and I would like it to run a batch file that's on the web server when I click a button on the website. Is this possible?

To reiterate:

Click button -> website runs batch file on same machine as webserver

Mike Zavarello
  • 3,514
  • 4
  • 29
  • 43
  • Yes this is. The implementation will depend on which webserver / technologies you wish to use but virtually all of them can handle it. – FloatingKiwi Aug 19 '16 at 01:00
  • @FloatingKiwi which would you recommend and how would I do it? – Cameron Burrows Aug 19 '16 at 01:06
  • Do you use any kind of programming languages at the moment, vb, c#, python etc? Do you have any programming tools setup like visual studio? Is you webserver only going to do this one task? Do you want it to be extendible or just a one off solution? – FloatingKiwi Aug 19 '16 at 01:13
  • @FloatingKiwi I use python, no, I would like several buttons to run several batch scripts, extendable to be able to do multiple buttons – Cameron Burrows Aug 19 '16 at 01:22
  • 1
    Possible duplicate of [Run a .bat file using python code](http://stackoverflow.com/questions/5469301/run-a-bat-file-using-python-code) –  Aug 19 '16 at 01:33

1 Answers1

1

Here's a lightweight webserver example in python: http://www.acmesystems.it/python_httpd

And running the batch file + getting the output: Run a .bat file using python code

Community
  • 1
  • 1
FloatingKiwi
  • 4,408
  • 1
  • 17
  • 41