I'm writing a script code for a user friendly deletion batch file.
@echo off
title delete program
echo delete program will now delete files.
pause
del./f /q /s>NUL
del./f /q /s
echo deletion complete
:again
echo Do you want to quit? [y/n]
YN
if errorlevel 49 goto again
if errorlevel 21 goto end
:end
echo Quitting the Master delete program program.
-------------------------------------------------------------------------
the information above I got from this website :
http://www.palmtoppaper.com/ptphtml/25/pt250058.htm
what im trying to do is make a batch file that deletes other files but not itself until the very end, where I want to put an if statement that says if the user answers yes to the Exit? question it deletes the batch file.
but I dont know how to add the exit y/n question or the if statement. and I want to hide the output of the del. command.
to make it look neater!
thats all!! all answers are much appreciated!!
2007-06-27
06:39:11
·
2 answers
·
asked by
Thirsty Attorney
1
in
Computers & Internet
➔ Programming & Design