There’s a wireless API you can use, I use it for starting files remotely, or sending individual gcode lines. I’ve documented them here;
Specifically the “send gcode” section,
@echo off
:a
set /p code=gcode to send:
curl -X POST "http://[IP HERE]:8080/api/v1/connect?token=[TOKEN HERE]"
curl -X POST "http://[IP HERE]:8080/api/v1/execute_code?token=[TOKEN HERE]&code=%code%"
goto :a
You just need the two curl lines and the proper information, the first post of that thread describes how to get the token for your machine. The machine should also take standard USB serial commands.