0

Here is my .bat file script.

cmd /k "https://exampleserver.com/server/php/ping.php"

When i run .the file via command line it says

'https:' is not recognized as an internal or external command,
operable program or batch file.

How can i run this without any error from command line ? Any help would be greatly appreciated

user3408779
  • 981
  • 2
  • 19
  • 43
  • 1
    Huh??? I haven't a clue what you mean by *"it is executing automatically via chrome browser. But I want this to execute via command line"*. Assuming your question has any value, I'm not sure it belongs on StackOverflow. It may be better suited to SuperUser. But you need to explain your problem better either way. – dbenham Apr 21 '17 at 04:47
  • I mean to execute via command line what should i write in the .bat file? for example start command and the program name like that – user3408779 Apr 21 '17 at 04:58
  • 1
    Windows command interpreter can execute only commands, executables and certain scripts. It can't open an URL using a protocol like [HTTPS](https://en.wikipedia.org/wiki/Https). This can be done only by applications written for that purpose, for example wwww browsers. You can use the command __START__ which finds out which application is associated with protocol HTTPS, i.e. use `start "" "https://exampleserver.com/server/php/ping.php"`. Run `start /?` in a cmd prompt window for details and see [Where is “START” searching for executables?](http://stackoverflow.com/a/27386403/3074564) – Mofi Apr 21 '17 at 05:30
  • When i run the file like above i am getting output in browser . Can't we get the output in cmd itself without open the browser? – user3408779 Apr 21 '17 at 05:35
  • google for `wget`. A command line tool for downloading websites. – Stephan Apr 21 '17 at 11:52
  • @user3408779 no, You cant do that, even if you do, you cant. You can do it in Ubuntu's commandline, but not in windows command line. – Regie Baguio Apr 21 '17 at 13:49

0 Answers0