I am blogging this for my own good because I always fucking forget the difference between this shit and lost the link. It was explained super well on StackOverflow. Sorry if you don’t give a fuck about it or it’s not funny. Whatever dudes.
A windows batch file (called.bat
orcalled.cmd
) can be called from another batch file (caller.bat
orcaller.cmd
) or interactive cmd.exe prompt in several ways:
- direct call:
called.bat
- using call command:
call called.bat
- using cmd command:
cmd /c called.bat
- using start command:
start called.bat
Answers:
- the batch file will be executed by the current cmd.exe instance (or a new cmd.exe instance if, for instance, double-clicked in Explorer).
- same as #1, only has an effect when used inside a batch/cmd file. In a batch file, without ‘call’, the parent batch file ends and control passes to the called batch file; with ‘call’ runs the child batch file, and the parent batch file continues with statements following call.
- runs the batch file in a new cmd.exe instance.
- start will run the batch file in a new cmd.exe instance in a new window, and the caller will not wait for completion.
Source:http://stackoverflow.com/questions/2607856/several-ways-to-call-a-windows-batch-file-from-another-one-or-from-prompt-which
Geeky Scripting Shit
December 18, 2013
Computer/ Tech Related, Useless Update
No Comments
Portfolioso
I am blogging this for my own good because I always fucking forget the difference between this shit and lost the link. It was explained super well on StackOverflow. Sorry if you don’t give a fuck about it or it’s not funny. Whatever dudes.
A windows batch file (
called.bat
orcalled.cmd
) can be called from another batch file (caller.bat
orcaller.cmd
) or interactive cmd.exe prompt in several ways:called.bat
call called.bat
cmd /c called.bat
start called.bat
Answers:
Source:http://stackoverflow.com/questions/2607856/several-ways-to-call-a-windows-batch-file-from-another-one-or-from-prompt-which