Last active
December 3, 2025 20:16
-
-
Save Fast0n/7bb78983dadd6e76dc13df7d9ee3cfec to your computer and use it in GitHub Desktop.
ADB SkyEmu Backup & ROM Organizer
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 | |
| setlocal EnableDelayedExpansion | |
| set ADB_PATH=c:\adb\adb.exe | |
| set SOURCE="/storage/emulated/0/Android/data/com.sky.SkyEmu/files" | |
| set BASE_DEST=D:\Windows\Download\pokemon\SkyEmu_files | |
| rem Date/time extraction | |
| for /f "tokens=1-6 delims=/:., " %%a in ("%date% %time%") do ( | |
| set YYYY=%%c | |
| set MM=%%a | |
| set DD=%%b | |
| set HH=%%d | |
| set MI=%%e | |
| set SS=%%f | |
| ) | |
| set TIMESTAMP=%YYYY%%MM%%DD%_%HH%%MI%%SS% | |
| set DEST=%BASE_DEST%\%TIMESTAMP% | |
| echo Checking connected devices... | |
| %ADB_PATH% devices | findstr /R "device$" >nul | |
| if %errorlevel%==0 ( | |
| echo Device detected. | |
| echo Creating folder: %DEST% | |
| mkdir "%DEST%" | |
| echo Starting pull... | |
| %ADB_PATH% pull %SOURCE% "%DEST%" | |
| echo Pull completed. | |
| echo Extracting .gba and .sav files from all subfolders... | |
| rem Find all .gba files recursively and move them to the root | |
| for /r "%DEST%" %%G in (*.gba) do ( | |
| move "%%G" "%DEST%" >nul | |
| ) | |
| rem Find all .sav files recursively and move them to the root | |
| for /r "%DEST%" %%S in (*.sav) do ( | |
| move "%%S" "%DEST%" >nul | |
| ) | |
| rem --- REMOVE ALL FILES ENDING WITH 1.sav --- | |
| del "%DEST%\*1.sav" >nul 2>&1 | |
| echo Cleaning leftover folders... | |
| for /f "delims=" %%D in ('dir "%DEST%" /ad /b /s') do ( | |
| rd "%%D" /s /q >nul 2>&1 | |
| ) | |
| echo Organizing ROMs... | |
| for %%G in ("%DEST%\*.gba") do ( | |
| set "ROMNAME=%%~nG" | |
| mkdir "%DEST%\!ROMNAME!" 2>nul | |
| move "%%G" "%DEST%\!ROMNAME!\" >nul | |
| if exist "%DEST%\%%~nG.sav" ( | |
| move "%DEST%\%%~nG.sav" "%DEST%\!ROMNAME!\" >nul | |
| ) | |
| ) | |
| echo Operation completed. | |
| ) else ( | |
| echo No device detected. Check cable or USB debugging. | |
| ) | |
| pause |
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
| Batch script that pulls SkyEmu files via ADB, extracts .gba and .sav files from all subfolders, removes unwanted `1.sav` saves, cleans up leftover directories, and organizes each ROM into its own folder. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment