HasterPaster

Batch file for deleting DayZ Game log files

Nov 19th, 2020 (edited)
295
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 1.06 KB | None | 0 0
  1. @echo off
  2.  
  3. rem Description: This script deletes DayZ game log files.
  4. rem Version: 1.0
  5. rem Date: 2020-05-05
  6.  
  7. cls
  8.  
  9. set logfilePath=C:\Users\YourUsername\AppData\Local\DayZ
  10.  
  11. rem Check to make sure the last character in the paths isn't "\".
  12. if %logfilePath:~-1% ==\ (
  13.     echo An error occured: The last character in the path to the game cant be "\". The script has been aborted.
  14.     echo Press ENTER to end the script and check the settings.
  15.     pause >nul
  16.     exit /b 0
  17. )
  18.  
  19. rem Check to make sure the paths exist.
  20. if not exist "%logfilePath%" (
  21.     echo An error occured: The path to the game "%logfilePath%" couldn't be found. The script has been aborted.
  22.     echo Press ENTER to end the script and check the settings.
  23.     pause >nul
  24.     exit /b 0
  25. )
  26.  
  27. cd /d %logfilePath%
  28.  
  29. del crash_*.log
  30. del DayZ_x64_*.RPT
  31. del DayZ_x64_*.mdmp
  32. del DayZServer_x64*.RPT
  33. del DayZServer_x64*.mdmp
  34. del GeneralActivity_*.log
  35. del MCKActivity_*.log
  36. del script_*.log
  37. del ServerPanel_*.log
  38. del VehicleActivity_*.log
  39. del VehicleDamage*.log
  40. del workbenchApp_*.RPT
  41. del ZomBerry\ZomBerry_*.log
  42.  
  43. exit /b 0
Add Comment
Please, Sign In to add comment