Can't run a batch file
-
I have a minecraft server, and I'm trying to be able to start it remotely, but can't find the right way to use triggercmd to do it.
Some information:
I was able to start it through cmd on my pc, with 2 lines of code:
cd "D:\Users\Patrocinio\Área de Trabalho\tavloa-redonda-mine\Server-tavola-redonda" #that is the path to my file
run.bat #that executes the file
But when I used this commands on triggercmd, it didn't seem to work, nothing happened
-
@Gabriel-Patrocinio , please try adding /d to the cd command.
Your default drive in cmd is so you have to switch drives. The /d parameter does that for you.
-
Just tried it and it didn’t work, nothing happened
command executed: cd /d “D:/(same path that worked on cmd)” -
@Gabriel-Patrocinio , come to think of it, you don't need to CD to the folder where the batch file is before you run it. You could make your command:
"d:\Users\Patrocin.....redonda\run.bat"
-
Didn’t work either, might that be a problem with my computer?
-
@Gabriel-Patrocinio , it's not likely a problem with your computer. I might know what it is. Please try moving the run.bat file to a folder like d:\scripts. I think the problem is you have a special non-ascii character in the path.
-
The non-ascii could well be the problem.
But doing a "CD" command and a "run" command is unnecessary so long as you're using the full path.
Just "D:\Users\Patrocinio**Á**rea de Trabalho\tavloa-redonda-mine\Server-tavola-redonda\run.bat" (with perhaps the special characters fixed) should work.
-
I just found that that it was working this whole time, but it was happening on the background, so thx guys