I've just downloaded swagger-codegen-cli (doesn't matter what it is, it's just an executable jar) in a Windows 10 OS, which runs from the command line. So to execute it I must go to the corresponding folder (in the command prompt, of course), and there run:
jara -jar swagger-codegen-cli-2.2.2.jar <command> [<args>]
which is, as you may see, quite annoying. I know I can create a batch file (.cmd
extension) and add the path to that file in the PATH
environment variable but I'm not sure how to write that batch. Can anyone say how to write that batch so I can write something like swagger-codegen <command> [<args>]
from anywhere in the command line?
It would be like an alias which I can add to PATH
, do I make myself clear? Thanks in advance for your answers.