Skip to content

Instantly share code, notes, and snippets.

@cptpiepmatz
Last active April 7, 2023 16:42
Show Gist options
  • Save cptpiepmatz/c43aaf6a28037be62faefc6152beb423 to your computer and use it in GitHub Desktop.
Save cptpiepmatz/c43aaf6a28037be62faefc6152beb423 to your computer and use it in GitHub Desktop.
A little tool to extract the GTAV Snapmatic pictures into your pictures folder in your user folder.
@echo off
rem Version 1.1.1
set picturePath="%UserProfile%\Pictures\GTA Snapmatic"
set convertScript="%UserProfile%\Pictures\GTA Snapmatic\ConvertSnapmaticToJpg.ps1"
md %picturePath%
echo Copying Snapmatic Pictures to Pictures Folder
echo ---------------------------------------------
for /D %%A in ("%UserProfile%\Documents\Rockstar Games\GTA V\Profiles\*") do (
copy "%%A\PGTA*" "%UserProfile%\Pictures\GTA Snapmatic\*.snapmatic" >nul
for %%B in ("%%A\PGTA*") do (
echo %%B
echo =^> %UserProfile%\Pictures\GTA Snapmatic\%%~nB.snapmatic
echo.
)
)
echo.
@echo $file=$args[0] > %convertScript%
@echo Write-Host $file >> %convertScript%
@echo $bytes=[system.io.file]::ReadAllBytes($file) >> %convertScript%
@echo [system.io.file]::WriteAllBytes($file.replace("snapmatic", "jpg"), $bytes[292..($bytes.length)]) >> %convertScript%
echo Converting Snapmatic Pictures to JPGs
echo -------------------------------------
for %%G in (%picturePath%\PGTA*.snapmatic) do (
powershell -ExecutionPolicy Bypass -command "& '%convertScript%' '%%G'"
echo =^> %%~pG\%%~nG.jpg
echo.
del "%%G"
)
del %convertScript%
explorer %picturePath%
echo DONE...
pause >nul
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment