@echo off
echo Programm for delete files *.txt
if '%1'=='' goto m1
dir %1
if not exist %1\*.txt goto m3
del /p %1\*.txt
dir %1
goto m4
:m3
echo No files for delete
:m4
if not '%1'=='' goto m2
:m1
dir
if not exist *.txt goto m5
del /p *.txt
dir
goto m2
:m5
echo No files for delete
:m2
pause