How to run a .bat from batch in another folderRunning multiple commands in multiple prompts from batchBatch...

Cycles on the torus

School performs periodic password audits. Is my password compromised?

Count each bit-position separately over many 64-bit bitmasks, with AVX but not AVX2

Use Mercury as quenching liquid for swords?

What is the purpose of a disclaimer like "this is not legal advice"?

Translation of 答えを知っている人はいませんでした

What is this tube in a jet engine's air intake?

Is this Paypal Github SDK reference really a dangerous site?

How should I solve this integral with changing parameters?

How do you make a gun that shoots melee weapons and/or swords?

Would those living in a "perfect society" not understand satire

How do spaceships determine each other's mass in space?

I am the person who abides by rules, but breaks the rules. Who am I?

Can the Witch Sight warlock invocation see through the Mirror Image spell?

Was it really inappropriate to write a pull request for the company I interviewed with?

How to write a chaotic neutral protagonist and prevent my readers from thinking they are evil?

I can't die. Who am I?

Is there a logarithm base for which the logarithm becomes an identity function?

What does *dead* mean in *What do you mean, dead?*?

Why does Central Limit Theorem break down in my simulation?

Having the player face themselves after the mid-game

Why aren't there more Gauls like Obelix?

How can I portion out frozen cookie dough?

What is the "determinant" of two vectors?



How to run a .bat from batch in another folder


Running multiple commands in multiple prompts from batchBatch or VBscirpt to copy only folder structure(Not Files) from one server to another server by giving folder structure as an separate input fileRunning Batch file from servers network share - using servers local user accountRun .sh in cygwin script from cmdrun a batch file from ftpHow To Run A Complex .bat fileHow to run multiple batch files with one master batch file.BAT file - What are all of the possible switches that will work outside a batch script?How to run a bat or vbs file in task schedulerWindows CMD - open bat from outside including goto













0















To make this clear:



Folder-structure looks like this: C:Folder1Folder2



"Folder1": Has one script that starts multiply script in "Folder2".
"Folder2": Contains scripts that launch and host servers IN "Folder2".



So, I have three .bat scripts in "Folder2" that launch an .jar file with the "java" command.



I want to make them all start at once -> one script in "Folder1". This one should start all three batch scripts, in separate windows.(because these are server).



The problem is, all the time I launch one of the .bat scripts from a script in "Folder1", Java (I assume) thinks I am in "Folder1" and the server, (that should start with the script) in "Folder2" , doesn't find config files....










share|improve this question









New contributor




Vernox Vernax is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





















  • Use the full path.

    – DrMoishe Pippik
    6 hours ago
















0















To make this clear:



Folder-structure looks like this: C:Folder1Folder2



"Folder1": Has one script that starts multiply script in "Folder2".
"Folder2": Contains scripts that launch and host servers IN "Folder2".



So, I have three .bat scripts in "Folder2" that launch an .jar file with the "java" command.



I want to make them all start at once -> one script in "Folder1". This one should start all three batch scripts, in separate windows.(because these are server).



The problem is, all the time I launch one of the .bat scripts from a script in "Folder1", Java (I assume) thinks I am in "Folder1" and the server, (that should start with the script) in "Folder2" , doesn't find config files....










share|improve this question









New contributor




Vernox Vernax is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





















  • Use the full path.

    – DrMoishe Pippik
    6 hours ago














0












0








0








To make this clear:



Folder-structure looks like this: C:Folder1Folder2



"Folder1": Has one script that starts multiply script in "Folder2".
"Folder2": Contains scripts that launch and host servers IN "Folder2".



So, I have three .bat scripts in "Folder2" that launch an .jar file with the "java" command.



I want to make them all start at once -> one script in "Folder1". This one should start all three batch scripts, in separate windows.(because these are server).



The problem is, all the time I launch one of the .bat scripts from a script in "Folder1", Java (I assume) thinks I am in "Folder1" and the server, (that should start with the script) in "Folder2" , doesn't find config files....










share|improve this question









New contributor




Vernox Vernax is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












To make this clear:



Folder-structure looks like this: C:Folder1Folder2



"Folder1": Has one script that starts multiply script in "Folder2".
"Folder2": Contains scripts that launch and host servers IN "Folder2".



So, I have three .bat scripts in "Folder2" that launch an .jar file with the "java" command.



I want to make them all start at once -> one script in "Folder1". This one should start all three batch scripts, in separate windows.(because these are server).



The problem is, all the time I launch one of the .bat scripts from a script in "Folder1", Java (I assume) thinks I am in "Folder1" and the server, (that should start with the script) in "Folder2" , doesn't find config files....







batch batch-file






share|improve this question









New contributor




Vernox Vernax is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




Vernox Vernax is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited 2 mins ago









Ahmed Ashour

1,3621716




1,3621716






New contributor




Vernox Vernax is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked 7 hours ago









Vernox VernaxVernox Vernax

1




1




New contributor




Vernox Vernax is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Vernox Vernax is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Vernox Vernax is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.













  • Use the full path.

    – DrMoishe Pippik
    6 hours ago



















  • Use the full path.

    – DrMoishe Pippik
    6 hours ago

















Use the full path.

– DrMoishe Pippik
6 hours ago





Use the full path.

– DrMoishe Pippik
6 hours ago










1 Answer
1






active

oldest

votes


















0














To change the working directory you simply use cd



So, in the batch in folder1:



cd folder2
java ...


Instead of



folder2java ...


If you want the process to start them together without waiting use start



cd folder2
start java first
start java second
start java third





share|improve this answer

























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "3"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });






    Vernox Vernax is a new contributor. Be nice, and check out our Code of Conduct.










    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1412747%2fhow-to-run-a-bat-from-batch-in-another-folder%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    To change the working directory you simply use cd



    So, in the batch in folder1:



    cd folder2
    java ...


    Instead of



    folder2java ...


    If you want the process to start them together without waiting use start



    cd folder2
    start java first
    start java second
    start java third





    share|improve this answer






























      0














      To change the working directory you simply use cd



      So, in the batch in folder1:



      cd folder2
      java ...


      Instead of



      folder2java ...


      If you want the process to start them together without waiting use start



      cd folder2
      start java first
      start java second
      start java third





      share|improve this answer




























        0












        0








        0







        To change the working directory you simply use cd



        So, in the batch in folder1:



        cd folder2
        java ...


        Instead of



        folder2java ...


        If you want the process to start them together without waiting use start



        cd folder2
        start java first
        start java second
        start java third





        share|improve this answer















        To change the working directory you simply use cd



        So, in the batch in folder1:



        cd folder2
        java ...


        Instead of



        folder2java ...


        If you want the process to start them together without waiting use start



        cd folder2
        start java first
        start java second
        start java third






        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited 27 mins ago

























        answered 41 mins ago









        Ahmed AshourAhmed Ashour

        1,3621716




        1,3621716






















            Vernox Vernax is a new contributor. Be nice, and check out our Code of Conduct.










            draft saved

            draft discarded


















            Vernox Vernax is a new contributor. Be nice, and check out our Code of Conduct.













            Vernox Vernax is a new contributor. Be nice, and check out our Code of Conduct.












            Vernox Vernax is a new contributor. Be nice, and check out our Code of Conduct.
















            Thanks for contributing an answer to Super User!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1412747%2fhow-to-run-a-bat-from-batch-in-another-folder%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Couldn't open a raw socket. Error: Permission denied (13) (nmap)Is it possible to run networking commands...

            VNC viewer RFB protocol error: bad desktop size 0x0I Cannot Type the Key 'd' (lowercase) in VNC Viewer...

            Why not use the yoke to control yaw, as well as pitch and roll? Announcing the arrival of...