Quote:
|
Originally Posted by Cyhaxor
ok guys i create a del.bat file and put it in C:\Documents and Settings\user\Desktop\BAT\ then i wrote the folowing script
cd..
cd..
cd..
cd..
del *.tmp /s
a cmd window open for 2-3secs and after finish its closed automatic... how i can keep this window open till i close it manual? 
|
You could add "pause" and "EXIT", and if you wanted it to look a bit nicer and not show the commands you could use "@ECHO OFF" and "ECHO" for any text you do want to show, also "ECHO." will make a line break.
example:
@ECHO OFF
ECHO.
ECHO Deleting TMP files. Please wait...
ECHO.
ECHO.
cd..
cd..
cd..
cd..
del *.tmp /s
ECHO.
pause
EXIT
Also, why not use the full path to the files you want to delete, instead of using "cd.. cd.. cd.. cd..", use "cd C:\WINDOWS".
example:
@ECHO OFF
ECHO.
ECHO Deleting TMP files. Please wait...
ECHO.
ECHO.
cd C:\WINDOWS
del *.tmp /s
ECHO.
pause
EXIT