what is bat file code example

Example 1: bat file

//Save it as start_dev.bat

@ECHO off
cd "C:\xampp"
start xampp-control.exe

cd "C:\Users\..."
start cmd /k "code . && ng s -o"
 
cd "C:\Users\..."
start cmd /k "code-insiders . && php artisan serve"

Example 2: batch write file

REM # | NOTE: this is for batch files (windows cmd)

REM # | EXAMPLE
echo This is the text you want in the actual file > NewFile.txt

REM # | SYNTAX
REM # | echo [insert-text] > [file-name]

Example 3: what is a windows batch file

@ECHO OFF
ECHO Congratulations! Your first batch file executed successfully.
PAUSE