batch file to kill a process, wait 10 seconds, then delete a file
O/S: Winodws 2000 sp4, Outlook 2003
I'm looking to create a batch file ("delete outcmd.bat") that kills a user's Ootlook.exe, waits 5 seconds and then deletes their outcmd.dat, frmcache.dat, extend.dat. My code simply reminds them to exit out of Outlook then deletes the files. So, I need the kill process part and the wait part. How would I do this? Anything in a Resource Kit that might help and if so which resource Kit. Thank you!
@echo offecho Attempting deletion of Outlook files: outcmd.dat, frmcache.dat, extend.datecho Please close of Outlook (File, Exit out) or files will NOT be deletedpauseecho -----------------------------------------------------------------------cd "C:\Documents and Settings\%username%\Application Data\Microsoft\Outlook"echo Attempting to delete outcmd.dat...del outcmd.datcd "C:\Documents and Settings\%username%\Local Settings\Application Data\Microsoft\FORMS"echo Attempting to delete frmcache.dat...del frmcache.datcd "C:\Documents and Settings\%username%\Local Settings\Application Data\Microsoft\Outlook"echo Attempting to delete extend.dat...del extend.datecho -----------------------------------------------------------------------echo Process completed !pause