Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- title RetroPie Update In Progress!!!
- color 1F
- echo ++++++++++++++++++++++++++++++++++++++++++++++
- echo Retropie USB Update Script -- @hooperre
- echo Version Beta 0.0.1 - 11/14/17
- ver
- echo ++++++++++++++++++++++++++++++++++++++++++++++
- echo.
- :: Define local variables and default roms source pathway
- set x=0
- set sys=0
- SET source=%CD%
- echo "%source%" is default directory.
- echo.
- :: Set Source Directory and ask for validation
- echo Confirm source is %source%?
- :SetYN0
- Set /P YN0= [Y/N]:
- if /I "%YN0%" EQU "Y" goto :YN0Continue
- if /I "%YN0%" EQU "N" goto :SetSource
- goto :SetYN0
- :SetSource
- echo What will be used as source roms folder location [Should end with roms folder ie. H:\retropie-mount\roms]?
- Set /P source= Enter source location:
- echo Confirm source is %source%?
- goto :SetYN0
- :YN0Continue
- echo.
- echo %source% will be source directory.
- echo.
- :: Create Source Directory Log
- echo Creating device log.
- echo.
- DIR > log.txt
- :: Set Destination
- :SetDestination
- Set /P destination= Please enter destination roms folder location [This is device being updated and should contain roms pathway ie. F:\roms]?
- echo Destination is %destination%? [Y/N]
- :SetYN1
- Set /P YN1= [Y/N]:
- if /I "%YN1%" EQU "Y" goto :YN1Continue
- if /I "%YN1%" EQU "N" goto :SetDestination
- goto :SetYN1
- :YN1Continue
- echo.
- echo %destination% will be destination directory.
- :: ======================================================
- :: Define System Pathways and Extensions
- :: ======================================================
- ::Amiga
- :AmigaPE
- set amiga_source="%source%\Amiga\"
- set amiga_dest="%destination%\Amiga\"
- set amiga_extensions=.zip .adf
- ::Atari 2600
- :Atari2600PE
- set atari2600_source="%source%\Atari2600\"
- set atari2600_dest="%destination%\Atari2600\"
- set atari2600_extensions=.zip .rom .bin .a26
- :: ======================================================
- :: Begin Amiga Script
- :: ======================================================
- :: Check for Amiga System Files
- :Amiga
- if exist "%source%\Amiga\" (
- echo Amiga found! ["%amiga_source%" -- "%amiga_dest%"]
- goto :AmigaFound
- ) else (
- echo Amiga not found! Skipping.
- pause
- goto :AmigaEnd
- )
- :AmigaFound
- chdir /d %amiga_source%
- echo %cd%
- pause
- goto :AmigaStart
- :: Initialize Amiga File Transfer
- :AmigaStart
- echo Begin Amiga update from %amiga_source% to %amiga_dest%? (Y/N/(S)kip)?
- Set /P YNAmiga= [Y/N/(S)kip]:
- if /I "%YNAmiga%" EQU "Y" goto :AmigaTransfer
- if /I "%YNAmiga%" EQU "N" goto :Amiga
- if /I "%YNAmiga%" EQU "S" goto :Atari2600Start
- goto :AmigaStart
- :AmigaTransfer
- echo Transferring.
- :AmigaLoop
- if defined amiga_extensions[%x%] (
- for %%F in (%amiga_source%\*!amiga_extensions[%x%]!) do (
- ECHO copy "%%~F" "%amiga_dest%"
- echo "%%~F" copied from %amiga_source% to %amiga_dest%
- )
- set /a x+=1
- goto :AmigaLoop
- )
- :: End Utility Script
- echo This concludes the USB Update Utility. Press any key to exit.
- pause
- exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement