Can't open .bat file!

Hello,

This worked for me:

/* 
 * Launch Example 1
 * v1.0.0
 * GLV 2021-04-12

 * Launches Google Chrome
*/

void setup() 
  {
  //Works:
  //println(sketchPath("")+"data/go.bat");
  //launch(sketchPath("")+"data/go.bat");
  
  //Works:
  println(sketchPath("")+"data\\go.bat");
  launch(sketchPath("")+"data\\go.bat");
  }  

go.bat in \data folder:

REM notepad.exe
start "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" "www.howtogeek.com"
pause

How to format:
FAQ - Processing Foundation

Reference:
https://www.howtogeek.com/663927/how-to-open-google-chrome-using-command-prompt-on-windows-10/

:)

1 Like