I found a way how you can MULTITASK / MULTITHREAD in batch (the batch does multiple things at the same time).
Code:
Code: Select all
@echo off
title Multitasking test
if not "%1"=="" goto %1
start /b %~nx0 2
start /b %~nx0 3
:1
echo Output loop 1
ping localhost -n 3 >nul
goto 1
:2
echo Output loop 2
ping localhost -n 2 >nul
goto 2
:3
echo Output loop 3
ping localhost -n 2 >nul
goto 3
Code: Select all
if not "%1"=="" goto %1
Code: Select all
start /b %~nx0 2
Code: Select all
:2
echo Output loop 2
ping localhost -n 2 >nul
goto 2
Have fun experimenting with this!