how to have a batch file code example
Example 1: How to run batch file and dellete it
@echo off
set mypath=%cd%
start %mypath%\filename here
del %mypath%\batcfilename.bat
exit
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
)