Okay, so I'm totally confused about what the hell is going on in my command prompt. I'm simply trying to make a script that will minimize the prompt window, open an IP address in the browser, and then run a simple HTTP server command via Python.
I have to run the HTTP server command AFTER the
start command because if I run the HTTP server first, then the next commands DON'T RUN.
I even went down to installing some old custom
.exe programs that added little features to fix things like this, but none of them worked correctly...
I actually figured out it was
"" that was causing it to not open the link, but it loads the site BEFORE the HTTP server starts. So my NEW question is: How do I run my
http.server command BEFORE the
start command without it not working (Running any command after an HTTP server command won't work since everything after it is never executed.)
Thanks again Anaksunaman for the answer, here is my final product for the command: (RunHTTPServer.bat):
@echo Off start "" /min python -m http.server 8000 -b 127.0.0.1 sleep 1 start http://127.0.0.1:8000/
I added --bind to bind it to 127.0.0.1, as sometimes when using http.server, and trying to connect to Localhost:8000, it will say connection failed...
so that, OR remove -b/--bind and simply write your PERSONAL address in that start field.