- Oct
- 19
- 0
Hello,
I have a personalized CleanUp TCC script that removed Dump files and other leftovers; it works pretty well 99.99% of the time. However, eventually, Malwarebytes creates a Dump file (.dmp) in a directory named C:\Windows\%LOCALAPPDATA% (literally), and the script fails to delete the file(s) in it because after expanding %LOCALAPPDATA% the directory name becomes C:\Windows\C:\Users\UserName\AppData\Local, which is obviously invalid.
I tried fooling around with SETDOS options, but if I disable expansion, other variables don't get expanded as they should. Am I missing something obvious?
I am almost positive this might have happened to other people as well; therefore I'd appreciate any suggestions.
Here the snippet of the code I use:
C:\Everything\es.exe -s -path C:\ -export-txt %PurgeList% *.dmp
For %File In (@%PurgeList%) Do (
Echo ``
Dir /ghkm "%File"
Pause /w300 /c Press any key to delete the file %File% or Ctrl-C to abort...
Del /efyz "%File"
)
Where the file in %PurgeList% contains the names of all the Dump files in the disk.
Any help is sincerely appreciated.
I have a personalized CleanUp TCC script that removed Dump files and other leftovers; it works pretty well 99.99% of the time. However, eventually, Malwarebytes creates a Dump file (.dmp) in a directory named C:\Windows\%LOCALAPPDATA% (literally), and the script fails to delete the file(s) in it because after expanding %LOCALAPPDATA% the directory name becomes C:\Windows\C:\Users\UserName\AppData\Local, which is obviously invalid.
I tried fooling around with SETDOS options, but if I disable expansion, other variables don't get expanded as they should. Am I missing something obvious?
I am almost positive this might have happened to other people as well; therefore I'd appreciate any suggestions.
Here the snippet of the code I use:
C:\Everything\es.exe -s -path C:\ -export-txt %PurgeList% *.dmp
For %File In (@%PurgeList%) Do (
Echo ``
Dir /ghkm "%File"
Pause /w300 /c Press any key to delete the file %File% or Ctrl-C to abort...
Del /efyz "%File"
)
Where the file in %PurgeList% contains the names of all the Dump files in the disk.
Any help is sincerely appreciated.