title: How to automate a command in a batch file?
body: <p>Hi I have a batch file named megacmd2.bat looking like this:</p>
  
  <pre><code>@rem
  @rem Megatools command line with appropriate paths set
  @rem
  @echo Megatools Shell
  @set PATH=%CD%;%PATH%
  @cmd
  </code></pre>
  
  <p>And this is the input I wish the batch to run automatically in stead of manually once it is launched:</p>
  
  <pre><code>megals /Root --username username@email.domain --password password
  megamkdir /Root/testmake2 --username username@email.domain --password password
  </code></pre>
  
  <p>But I have no Idea how or even where I should enter these lines without disturbing the rest of the batch file. In first instance I tried launching the .bat file by another bat file passing along these commands, but that did not work. </p>
  
  <p>Now I tried learning the specifics for the batch scripting to incorporate this succesfully, whilst looking at countless of examples reaching the same goal. But I can't seem to get the syntax right for this specific problem. Any suggestions?</p>