daily pastebin goal
57%
SHARE
TWEET

Untitled

a guest Nov 15th, 2017 71 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @echo off
  2. title RetroPie Update In Progress!!!
  3. color 1F
  4.  
  5. echo ++++++++++++++++++++++++++++++++++++++++++++++
  6. echo Retropie USB Update Script -- @hooperre
  7. echo Version Beta 0.0.1 - 11/14/17
  8. ver
  9. echo ++++++++++++++++++++++++++++++++++++++++++++++
  10. echo.
  11.  
  12. :: Define local variables and default roms source pathway
  13.  
  14. set x=0
  15. set sys=0
  16.  
  17. SET source=%CD%
  18. echo "%source%" is default directory.
  19. echo.
  20.  
  21. :: Set Source Directory and ask for validation
  22. echo Confirm source is %source%?
  23. :SetYN0
  24. Set /P YN0= [Y/N]:
  25.     if /I "%YN0%" EQU "Y" goto :YN0Continue
  26.     if /I "%YN0%" EQU "N" goto :SetSource
  27.     goto :SetYN0
  28.    
  29. :SetSource
  30. echo What will be used as source roms folder location [Should end with roms folder ie. H:\retropie-mount\roms]?
  31. Set /P source= Enter source location:
  32. echo Confirm source is %source%?
  33. goto :SetYN0
  34.  
  35. :YN0Continue
  36. echo.
  37. echo %source% will be source directory.
  38. echo.
  39.  
  40. :: Create Source Directory Log
  41. echo Creating device log.
  42. echo.
  43. DIR > log.txt
  44.  
  45. :: Set Destination
  46. :SetDestination
  47. Set /P destination= Please enter destination roms folder location [This is device being updated and should contain roms pathway ie. F:\roms]?
  48. echo Destination is %destination%? [Y/N]
  49.  
  50. :SetYN1
  51. Set /P YN1= [Y/N]:
  52.     if /I "%YN1%" EQU "Y" goto :YN1Continue
  53.     if /I "%YN1%" EQU "N" goto :SetDestination
  54.     goto :SetYN1
  55.  
  56. :YN1Continue
  57. echo.
  58. echo %destination% will be destination directory.
  59.  
  60. :: ======================================================
  61. :: Define System Pathways and Extensions
  62. :: ======================================================
  63.  
  64. ::Amiga
  65. :AmigaPE
  66.  
  67. set amiga_source="%source%\Amiga\"
  68. set amiga_dest="%destination%\Amiga\"
  69. set amiga_extensions=.zip .adf
  70.  
  71. ::Atari 2600
  72. :Atari2600PE
  73. set atari2600_source="%source%\Atari2600\"
  74. set atari2600_dest="%destination%\Atari2600\"
  75. set atari2600_extensions=.zip .rom .bin .a26
  76.  
  77. :: ======================================================
  78. :: Begin Amiga Script
  79. :: ======================================================
  80.  
  81. :: Check for Amiga System Files
  82. :Amiga
  83. if exist "%source%\Amiga\" (
  84.     echo Amiga found! ["%amiga_source%"  -- "%amiga_dest%"]
  85.     goto :AmigaFound
  86. ) else (
  87.     echo Amiga not found!  Skipping.
  88.     pause
  89.     goto :AmigaEnd
  90. )
  91.  
  92. :AmigaFound
  93. chdir /d %amiga_source%
  94. echo %cd%
  95. pause
  96. goto :AmigaStart
  97.  
  98. :: Initialize Amiga File Transfer
  99. :AmigaStart
  100. echo Begin Amiga update from %amiga_source% to %amiga_dest%? (Y/N/(S)kip)?
  101. Set /P YNAmiga= [Y/N/(S)kip]:
  102.     if /I "%YNAmiga%" EQU "Y" goto :AmigaTransfer
  103.     if /I "%YNAmiga%" EQU "N" goto :Amiga
  104.     if /I "%YNAmiga%" EQU "S" goto :Atari2600Start
  105.     goto :AmigaStart
  106.  
  107. :AmigaTransfer
  108. echo Transferring.
  109.  
  110.  
  111. :AmigaLoop
  112. if defined amiga_extensions[%x%] (
  113.     for %%F in (%amiga_source%\*!amiga_extensions[%x%]!) do (
  114.         ECHO copy "%%~F" "%amiga_dest%"
  115.         echo "%%~F" copied from %amiga_source% to %amiga_dest%
  116.     )
  117.     set /a x+=1
  118.     goto :AmigaLoop
  119. )
  120.  
  121. :: End Utility Script
  122. echo This concludes the USB Update Utility.  Press any key to exit.
  123. pause
  124. exit
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top