Writing functions in windows batch

Below script shows how to write and call functions in Windows batch programming. In below example, we have created one function with name “f1” and called it from main script using “CALL” command.
 
@echo off

CALL :f1
EXIT /B

:f1
ECHO Inside function “f1” doing some stuff
EXIT /B 0

Complex problems, Simple Solutions