• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
TRIGGERcmd
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login

Can't run a batch file

General Discussion
3
8
451
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G
    Gabriel Patrocinio
    last edited by Gabriel Patrocinio Nov 9, 2021, 5:19 PM Nov 9, 2021, 4:53 PM

    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
    unknown.png

    R 1 Reply Last reply Nov 9, 2021, 7:30 PM Reply Quote 0
    • R
      Russ @Gabriel Patrocinio
      last edited by Russ Nov 10, 2021, 1:38 AM Nov 9, 2021, 7:30 PM

      @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.

      Russell VanderMey

      1 Reply Last reply Reply Quote 0
      • G
        Gabriel Patrocinio
        last edited by Nov 10, 2021, 2:09 AM

        Just tried it and it didn’t work, nothing happened
        command executed: cd /d “D:/(same path that worked on cmd)”

        R 1 Reply Last reply Nov 10, 2021, 2:28 AM Reply Quote 0
        • R
          Russ @Gabriel Patrocinio
          last edited by Nov 10, 2021, 2:28 AM

          @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"
          

          Russell VanderMey

          1 Reply Last reply Reply Quote 0
          • G
            Gabriel Patrocinio
            last edited by Nov 10, 2021, 10:11 AM

            Didn’t work either, might that be a problem with my computer?

            R 1 Reply Last reply Nov 10, 2021, 12:53 PM Reply Quote 0
            • R
              Russ @Gabriel Patrocinio
              last edited by Nov 10, 2021, 12:53 PM

              @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.

              Russell VanderMey

              1 Reply Last reply Reply Quote 0
              • X
                Xander
                last edited by Xander Nov 11, 2021, 3:09 PM Nov 11, 2021, 3:09 PM

                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.

                1 Reply Last reply Reply Quote 0
                • G
                  Gabriel Patrocinio
                  last edited by Nov 12, 2021, 10:40 AM

                  I just found that that it was working this whole time, but it was happening on the background, so thx guys

                  1 Reply Last reply Reply Quote 1
                  6 out of 8
                  • First post
                    6/8
                    Last post