@echo off Title Secured Chat %random% -- ExpertComputingAdvice.com color 0b echo This Is A Secured Chat - Authorisation Number:%random% echo --------------------------------------------------- echo. set /p username=User ID: echo %username% has joined! > join.dat :message set /p message=Say: goto ip : ip for /f "tokens=1-2 delims=:" %%a in ('ipconfig^|find "IPv4"') do set ip=%%b set ip=%ip:~1% goto send :send echo %username%@%ip%:(%time%)GMT -- %message% >>log.dat goto message