0

How do I create a batch file that creates a custom batch file? I was wondering how to so I can make a certain application on my computer. Thank you. :)

  • 1
    [related](http://stackoverflow.com/q/36678248/2152082) – Stephan May 06 '16 at 18:42
  • Assuming you're talking about windows batch files, see a [related](http://stackoverflow.com/questions/7954719/how-can-a-batch-script-do-the-equivalent-of-cat-eof) question and answer. This post explains how to create _any_ file with _any_ contents from a batch file. Having said that, batch files are really not well suited to that kind of work. On the other hand, you can use `echo "content" > batch_file.bat` to create first line and then `echo "more content" >> batch_file.bat` to append to that. Batch files are not special in any way, they just have a `.bat` extension. – miha May 06 '16 at 19:30

1 Answers1

0

Write a .bat file with this:

echo echo hi > "{path}\mybat.bat"
echo echo pause >> "{path}\mybat.bat"
taquion
  • 2,667
  • 2
  • 18
  • 29