Click here to Skip to main content
15,892,746 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
cd Resources
java -jar ProtractorReportGenerator.jar D:\folder\Report D:\folder\Report\

i have this code in my batch file.

i have a jar file in a resource folder but after executing that jar i need to move one step back to main folder. I cant shift the jar file to another folder. it is mandatory to place that jar in same resources folder . How do i do this
Posted
Updated 10-May-15 18:08pm
v2

1 solution

To answer just the title of the question:
pushd someDirectory
do-something-in-this-directory
popd
you-are-at-the-previous-directory

Just in case: if you simple needed to go to a parent directory, use
cd ..

Please see:
http://en.wikipedia.org/wiki/Pushd_and_popd[^].

Sorry, I'm too lazy to read and understand the whole question written by so lazy person. To me, it's enough to see that you did not explain what exactly do you mean by "step back". Just learning cd, pushd, popd and syntax of directory names will be enough to solve any similar "problem".

—SA
 
Share this answer
 
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900