@echo off
del /q %2
for /f "tokens=1-3 delims=," %%i in ('type %1') do call DELUSRG %%i "%%j" "%%k" %2 2&1
exit
DELUSRG.BAT
@echo off
if %2=="" goto err
if %3=="" goto err
if /i "%1"=="g" goto dgg
if /i "%1"=="l" goto dlg
if /i "%1"=="w" goto wlg
:err
@echo Error:%1,%2,%3
goto end
:dgg
@ECHO ON
net group %2 %3 /DELETE /DOMAIN
@ECHO OFF
goto end
:dlg
@ECHO ON
net localgroup %2 %3 /DELETE /DOMAIN
@ECHO OFF
goto end
:wlg
@ECHO ON
net localgroup %2 %3 /DELETE
@ECHO OFF
:end