Created
November 1, 2024 12:04
-
-
Save repsejnworb/b71b46c7dfdd4b5ca1fb0fdfb27438de to your computer and use it in GitHub Desktop.
batch script to quickly check AoC usage
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @echo off | |
| @For /F "tokens=*" %%a IN ('"dir %localappdata%\AOC\Saved\* /s /-c | find "bytes" | find /v "free""') do @Set gameSum=%%a | |
| @For /F "tokens=*" %%a IN ('"dir "%localappdata%\Intrepid Studios\Launcher\*" /s /-c | find "bytes" | find /v "free""') do @Set launcherSum=%%a | |
| @For /f "tokens=1,2 delims=)" %%a in ("%gameSum%") do @set gamefilesout=%%a&set gamesizeout=%%b | |
| @For /f "tokens=1,2 delims=)" %%a in ("%launcherSum%") do @set launcherfilesout=%%a&set launchersizeout=%%b | |
| @Set gamesizeout=%gamesizeout:bytes=% | |
| @Set gamesizeout=%gamesizeout: =% | |
| @Set launchersizeout=%launchersizeout:bytes=% | |
| @Set launchersizeout=%launchersizeout: =% | |
| set /a kb=%gamesizeout% / 1024 | |
| set /a mb=%gamesizeout% / 1048576 | |
| set /a gb=%gamesizeout% / 1073741824 | |
| if %gb% equ 0 (@Echo %mb% MB -- %localappdata%\AOC\Saved\ ) else (@Echo %gb% GB, or %mb% MB -- %localappdata%\AOC\Saved\) | |
| set /a kb=%launchersizeout% / 1024 | |
| set /a mb=%launchersizeout% / 1048576 | |
| set /a gb=%launchersizeout% / 1073741824 | |
| if %gb% equ 0 (@Echo %mb% MB -- %localappdata%\Intrepid Studios\Launcher ) else (@Echo %gb% GB, or %mb% MB -- %localappdata%\Intrepid Studios\Launcher) | |
| pause |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Example output: