how to run cmd from batch file and go to folder within parent folder
batch-file, cmd, command-prompt
Solution
Edited after a comment below:
:: two.bat
@echo off
cd /d "c:\folder\jar"
java -jar "TASKApi.jar"
To keep the console window open for further input, launch the batch file above from another batch file.
:: one.bat
@echo off
cmd /k call two.bat
Problem
I have to create a batch file as below 1) It will run cmd 2) then withing that command prompt goes back to parent folder may be with cd.. 3) then go to folder jar may with cd jar 4) run command java -jar TASKApi.jar and this command prompt should remain open currently I am using below code ``` start cmd.exe /k cd.. cd jar java -jar TASKApi.jar ``` But only first line works other two line does not Please tell me how can I do this