Skip to content

Instantly share code, notes, and snippets.

@solariz
Created December 14, 2023 20:46
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save solariz/ae541ac710d6e96e2a12c97a0a82c37e to your computer and use it in GitHub Desktop.
StarCitizen Shader Log
@echo off
set SC_FILES=%localappdata%\Star Citizen
set LOGFILE=shader.csv
setLocal EnableDelayedExpansion
echo Monitoring dir: %SC_FILES%...
echo Writing log to %LOGFILE%
:LOOP
For /f "delims=." %%A in (
'wmic os get LocalDateTime^|findstr ^^20'
) Do Set DT=%%A
Set "TIMESTAMP=%DT:~0,4%-%DT:~4,2%-%DT:~6,2% %DT:~8,2%:%DT:~10,2%:%DT:~12,2%"
set /a value=0
set /a sum=0
set /a n=0
FOR /R "%SC_FILES%" %%I IN (*) DO (
if %%~xI == .tok (
set /a value=%%~zI
set /a sum=!sum!+!value!
set /a n+=1
)
)
echo %TIMESTAMP%;%n%;!sum!; >> %LOGFILE%
echo %TIMESTAMP% %n% Files in !sum! Bytes
set /a sum=%sum% / 1024
echo %n% Shader Files in %sum% KB > obs_overlay.txt
@timeout /t 10 /nobreak >nul
GOTO LOOP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment