how to create and write a batch file code example
Example 1: what is a windows batch file
@ECHO OFF
ECHO Congratulations! Your first batch file executed successfully.
PAUSE
Example 2: batch file extension
@echo off
setlocal
set file=C:\Users\l72rugschiri\Desktop\fs.cfg
for %%i IN ("%file%") do (
echo filedrive=%%~di
echo filepath=%%~pi
echo filename=%%~ni
echo fileextension=%%~xi
)