Functions In Batch
Posted: 24 Jun 2011 07:01
What is the closest thing to a function in Batch?
I've been playing around trying to think of something but the best I could get was making a function.bat file with the super basic code
That just allows you to like use
So basically it just creates a Batch file with your code so you can then call on it later.
I'm looking for a more complicated one, though.
I've been playing around trying to think of something but the best I could get was making a function.bat file with the super basic code
Code: Select all
:%1
(
echo %2 %3 %4 %5 %6 %7 %8 %9
)>%1.bat
That just allows you to like use
Code: Select all
call function greet echo hi
call greet
pause
So basically it just creates a Batch file with your code so you can then call on it later.
I'm looking for a more complicated one, though.