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

    Can't run a batch file

    Scheduled Pinned Locked Moved General Discussion
    8 Posts 3 Posters 1.3k Views 1 Watching
    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.
    • Gabriel PatrocinioG Offline
      Gabriel Patrocinio
      last edited by Gabriel Patrocinio

      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

      RussR 1 Reply Last reply Reply Quote 0
      • RussR Offline
        Russ @Gabriel Patrocinio
        last edited by Russ

        @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
        • Gabriel PatrocinioG Offline
          Gabriel Patrocinio
          last edited by

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

          RussR 1 Reply Last reply Reply Quote 0
          • RussR Offline
            Russ @Gabriel Patrocinio
            last edited by

            @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
            • Gabriel PatrocinioG Offline
              Gabriel Patrocinio
              last edited by

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

              RussR 1 Reply Last reply Reply Quote 0
              • RussR Offline
                Russ @Gabriel Patrocinio
                last edited by

                @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
                • XanderX Offline
                  Xander
                  last edited by Xander

                  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
                  • Gabriel PatrocinioG Offline
                    Gabriel Patrocinio
                    last edited by

                    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

                    Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                    Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                    With your input, this post could be even better 💗

                    Register Login
                    • First post
                      Last post