You may know that you can run a program or a batch file from your own batch file with the help of commands 'start' and 'call'. Both of them are used quite often, but what's the difference between them?
'Call' command pauses the execution of your batch file until the end of working of the called program or script. You can see it by creating a test batch file with a single 'pause' command. Save this test script as 'tst.cmd' and create batch file with text 'call tst' (no quotes). You'll see that your batch file waits for the end of execution of tst.cmd.
'Start' command starts the program or script in independent mode. Change 'call' in your batch file to 'start'. You'll see that the main batch file closes its window while 'tst.cmd' is still running.
We kindly remind that Dr.Batcher is the best program to create batch file, both .BAT and .CMD, try it if haven't tried it yet.
No comments:
Post a Comment