Skip to content
Advertisement

How do I write this in a batch file

I am trying to convert a shell script into a batch file but I am stuck at this place.

I am not quite sure how to convert this line into my batch file.

JavaScript

I tried

JavaScript

but I am not sure if I am right!

Advertisement

Answer

You can’t do command chaining like this in Batch. If I see that correctly, you want to get the absolute path of the directory two levels above the directory of the currently executed script. You might do this:

JavaScript

Which changes the current directory. To avoid that, use:

JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement