@echo off rem rem delete.bat rem if "%1"=="" goto Usage if "%2"=="" goto Usage if "%1"=="-h" goto Usage if not exist %2 goto End REM ...do something with %1 here... echo deleting '%2' REM ...log to S:... attrib -r %2 del %2 goto End :Usage echo. echo usage: delete.bat option file echo. rem echo '-a' - delete obsolete files without prompt rem echo '-u' - prompt for go-ahead before deleting echo '-h' - display help (this message) echo. goto End :End