Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: Deleting dll files after execution cleanup dlls
del_files_temp = FileCreateTemp("~ww") ; get a .tmp file del_files_path=StrReplace(StrLower(del_files_temp),".tmp",".bat") ; create bat file name FileRename(del_files_temp,del_files_path) ; rename .tmp to .bat file handle = FileOpen(del_files_path, "WRITE") ; open bat file for write FileWrite(handle, "@ECHO OFF%@CRLF%REM ******THIS FILE IS SAFE TO DELETE******%@CRLF%%@CRLF%ECHO ON") FileWrite(handle, ":loop") ; delete older dlls (if there) 2004A- FileWrite(handle, "era wbd*34i.dll") ; delete dlls FileWrite(handle, "era wbo*34i.dll") FileWrite(handle, "if exist wbd*34i.dll goto loop") ; if file not deleted, loop and try again FileWrite(handle, "if exist wbo*34i.dll goto loop") FileWrite(handle, ":loop2") ; delete newer dlls 2004B+ FileWrite(handle, "era wbd*44i.dll") ; delete dlls FileWrite(handle, "era wbo*44i.dll") FileWrite(handle, "if exist wbd*44i.dll goto loop2") FileWrite(handle, "if exist wbo*44i.dll goto loop2") ; if file not deleted, loop and try again FileWrite(handle, ":loop3") ; delete other files FileWrite(handle, "era yourfile1.txt") ; delete your files FileWrite(handle, "era yourfile2.txt") ; add other files to delete here FileWrite(handle, "if exist yourfile1.txtl goto loop3") ; if file not deleted, loop and try again FileWrite(handle, "if exist yourfile3 goto loop3") ; delete *this* bat file FileWrite(handle, StrCat("era ",del_files_path)) FileClose(handle) RunHide(del_files_path,"") Exit
Article ID: W15488
File Created: 2004:03:12:11:58:06
Last Updated: 2004:03:12:11:58:06