• IP Copied!
    Loading...
  • Bat file HELP! Anyone with knowledge, plz!

    Xx3mpireGamerxX

    New member
    Xx3mpireGamerxX
    Xx3mpireGamerxX Xx3mpireGamerxX
    I know this is off-topic, but there was nowhere else to put it. I know that the server owners could probably figure it out.

    OK, so I want to run a class file I programmed with java through a bat file. I have the first bat file,
    WordGame.bat

    @echo off
    java WordGame

    That works.
    The second one runs the first one
    Interview.bat

    WordGame

    That works.
    This is my folder setup:

    -Interview
    ----Bin (folder)
    -------Scripts (folder)
    ----------WordGame.java
    ----------WordGame.class
    -------WordGame.class
    -------WordGame.bat
    -------Interview.bat
    ----StartInterview.bat

    I want the "StartInterview" to run "Interview", but I also want it to work when I send the files to my friend. So I can't do "cd C:\...\Interview\bin" then "Interview", I have to find a way so the bat file reads the file in the separate folder, but doesn't require like a specific path. (If my friend uses it, then it will be in a different path) The reason I don't need a path for the others is because they are all in the same folder.

    Thanks!

    [SOLVED] I used "pushd" to go from my current dir up.

    Screenshots:
    Screenshot_1.png Screenshot_2.png Screenshot_3.png
     
    Last edited:

    Xx3mpireGamerxX

    New member
    Xx3mpireGamerxX
    Xx3mpireGamerxX Xx3mpireGamerxX
    Thanks for the help lol.
    I looked over google (probably did like 25 separate searches) and I found one thing that I thought might help me, but it didn't work. If you know nothing on computers, you should not have replied to this post. I said, "...anyone with knowledge...help...". Sorry, but that doesn't help me whatsoever.

    BTW, I like your enthusiasm to stop bullying, I was a victim of that. You come across strong, but the truth hurts, and reality never leaves.
     

    _Tachi_

    Champion
    _Tachi_
    _Tachi_ _Tachi_
    Thanks for the help lol.
    I looked over google (probably did like 25 separate searches) and I found one thing that I thought might help me, but it didn't work. If you know nothing on computers, you should not have replied to this post. I said, "...anyone with knowledge...help...". Sorry, but that doesn't help me whatsoever.

    BTW, I like your enthusiasm to stop bullying, I was a victim of that. You come across strong, but the truth hurts, and reality never leaves.
    Sorry that my suggestion didnt help you, and sorry that you have experienced bullying, i was once a victim of it myself until i decided one day that i wasnt going to take it anymore
     

    Xx3mpireGamerxX

    New member
    Xx3mpireGamerxX
    Xx3mpireGamerxX Xx3mpireGamerxX
    Good for you! I am over it now. We left the school group and I am now homeschooled and I am loving it. Sorry that this happened to you and sooo many other people.