I'm trying to run the following .bat file using windows CMD:

lein run
cd..

The first line works perfectly fine and the clojure program does its job:

(spit some-file some-stuff)

The second line however never gets executed. Why is that?

有帮助吗?

解决方案

My apologies in advance if I have misunderstood your question. From what I gather it sounds like changing folders within a script sets the new current folder within the script though it does not necessarily set the current folder from the perspective of the terminal that invoked the script.

it could make this more clear if you put a print statement after the cd .. to show you the directory from the perspective of the script.

其他提示

try this:

start /b "" lein run
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top