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
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
New contributor
add a comment |
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
New contributor
Use the full path.
– DrMoishe Pippik
6 hours ago
add a comment |
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
New contributor
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
batch batch-file
New contributor
New contributor
edited 2 mins ago
Ahmed Ashour
1,3621716
1,3621716
New contributor
asked 7 hours ago
Vernox VernaxVernox Vernax
1
1
New contributor
New contributor
Use the full path.
– DrMoishe Pippik
6 hours ago
add a comment |
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
add a comment |
1 Answer
1
active
oldest
votes
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
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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
add a comment |
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
add a comment |
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
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
edited 27 mins ago
answered 41 mins ago
Ahmed AshourAhmed Ashour
1,3621716
1,3621716
add a comment |
add a comment |
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.
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
Use the full path.
– DrMoishe Pippik
6 hours ago