@echo off echo. echo rmdirtree 1.0 by Cynosure.X International echo Copyright (C) 1997 by Chieh Cheng. All Rights Reserved. echo. if (%1) == () goto help if not exist %1 goto error if (%2) == (/n) goto noprompt if (%2) == (/N) goto noprompt if (%2) == () goto start goto badargs :start echo Delete files del %1\* /s echo Remove directories rd %1 /s goto end :noprompt echo Deleting files . . . echo y | del %1\* /s echo Removing directories . . . echo y | rd %1 /s goto end :error echo *** Error: directory %1 does not exist. echo. goto help :badargs echo *** Error: bad arguments. echo. :help echo Usage: rmdirtree [directory] [/n] echo. echo Use the /n or /N flag to by-pass the prompts. echo However, be very sure when you use this flag; echo deleted files may be un-recoverable. :end