0

I just started with using batch files, my whole purpose of using them is to save the time I spend running the same commands(command line) and process (making moving folders)

Let me ask on a specific example for now:
I want to run this two commands in a single batch file

cd c:dir\..\dir\bin

prompt:

:WSDL.bat -o C:\somepatch\..\dir -uri someURL.xml

now instead of writing this three commands individually , I want them written on a single batch file , which would run every time the batch file is run.

I tried bunch of things ,but didn't really work out

Snedden27
  • 1,870
  • 7
  • 32
  • 60
  • and what does not work? – npocmaka Feb 11 '15 at 20:33
  • show us some of the bunch of things that don't work. – PA. Feb 11 '15 at 20:45
  • Please, do not post code snippets in comments, as it becomes slightly unreadable. [Edit] your question instead. – JosefZ Feb 11 '15 at 21:43
  • Sorry, I won't henceforth – Snedden27 Feb 11 '15 at 21:49
  • DOS allows you to chain commands together using `&` and `&&` the single `&` will cause the second command to run regardless if the first command was successful. The `&&` only runs the second command if the first command was successful. -edit, see http://stackoverflow.com/questions/25343351/single-line-with-multiple-commands-using-windows-batch-file – user4317867 Feb 11 '15 at 22:21
  • start `notepad.exe`, put the three lines in and save it as `myname.bat`. Just type `myname`[Enter] to execute it. Note: it has to be somewhere, where windows can find it (either in the current working directory or in a folder defined in `&PATH%`) – Stephan Mar 06 '16 at 10:28

0 Answers0