├── LICENSE ├── README.md ├── fast7ztoZip ├── README.md └── fast7ztoZip.bat ├── fastcompare ├── README.md └── fastcompare.bat ├── fastlister ├── README.md └── fastlister.bat ├── fastscraper ├── README.md ├── fastscraper └── fastscraper.bat ├── fastsorter ├── Automatic Gamelists Filter.xlsx ├── README.md └── fastsorter.bat └── fastunmount ├── README.md └── fastunmount.bat /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 2, June 1991 3 | 4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc., 5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 6 | Everyone is permitted to copy and distribute verbatim copies 7 | of this license document, but changing it is not allowed. 8 | 9 | Preamble 10 | 11 | The licenses for most software are designed to take away your 12 | freedom to share and change it. By contrast, the GNU General Public 13 | License is intended to guarantee your freedom to share and change free 14 | software--to make sure the software is free for all its users. This 15 | General Public License applies to most of the Free Software 16 | Foundation's software and to any other program whose authors commit to 17 | using it. (Some other Free Software Foundation software is covered by 18 | the GNU Lesser General Public License instead.) You can apply it to 19 | your programs, too. 20 | 21 | When we speak of free software, we are referring to freedom, not 22 | price. Our General Public Licenses are designed to make sure that you 23 | have the freedom to distribute copies of free software (and charge for 24 | this service if you wish), that you receive source code or can get it 25 | if you want it, that you can change the software or use pieces of it 26 | in new free programs; and that you know you can do these things. 27 | 28 | To protect your rights, we need to make restrictions that forbid 29 | anyone to deny you these rights or to ask you to surrender the rights. 30 | These restrictions translate to certain responsibilities for you if you 31 | distribute copies of the software, or if you modify it. 32 | 33 | For example, if you distribute copies of such a program, whether 34 | gratis or for a fee, you must give the recipients all the rights that 35 | you have. You must make sure that they, too, receive or can get the 36 | source code. And you must show them these terms so they know their 37 | rights. 38 | 39 | We protect your rights with two steps: (1) copyright the software, and 40 | (2) offer you this license which gives you legal permission to copy, 41 | distribute and/or modify the software. 42 | 43 | Also, for each author's protection and ours, we want to make certain 44 | that everyone understands that there is no warranty for this free 45 | software. If the software is modified by someone else and passed on, we 46 | want its recipients to know that what they have is not the original, so 47 | that any problems introduced by others will not reflect on the original 48 | authors' reputations. 49 | 50 | Finally, any free program is threatened constantly by software 51 | patents. We wish to avoid the danger that redistributors of a free 52 | program will individually obtain patent licenses, in effect making the 53 | program proprietary. To prevent this, we have made it clear that any 54 | patent must be licensed for everyone's free use or not licensed at all. 55 | 56 | The precise terms and conditions for copying, distribution and 57 | modification follow. 58 | 59 | GNU GENERAL PUBLIC LICENSE 60 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 61 | 62 | 0. This License applies to any program or other work which contains 63 | a notice placed by the copyright holder saying it may be distributed 64 | under the terms of this General Public License. The "Program", below, 65 | refers to any such program or work, and a "work based on the Program" 66 | means either the Program or any derivative work under copyright law: 67 | that is to say, a work containing the Program or a portion of it, 68 | either verbatim or with modifications and/or translated into another 69 | language. (Hereinafter, translation is included without limitation in 70 | the term "modification".) Each licensee is addressed as "you". 71 | 72 | Activities other than copying, distribution and modification are not 73 | covered by this License; they are outside its scope. The act of 74 | running the Program is not restricted, and the output from the Program 75 | is covered only if its contents constitute a work based on the 76 | Program (independent of having been made by running the Program). 77 | Whether that is true depends on what the Program does. 78 | 79 | 1. You may copy and distribute verbatim copies of the Program's 80 | source code as you receive it, in any medium, provided that you 81 | conspicuously and appropriately publish on each copy an appropriate 82 | copyright notice and disclaimer of warranty; keep intact all the 83 | notices that refer to this License and to the absence of any warranty; 84 | and give any other recipients of the Program a copy of this License 85 | along with the Program. 86 | 87 | You may charge a fee for the physical act of transferring a copy, and 88 | you may at your option offer warranty protection in exchange for a fee. 89 | 90 | 2. You may modify your copy or copies of the Program or any portion 91 | of it, thus forming a work based on the Program, and copy and 92 | distribute such modifications or work under the terms of Section 1 93 | above, provided that you also meet all of these conditions: 94 | 95 | a) You must cause the modified files to carry prominent notices 96 | stating that you changed the files and the date of any change. 97 | 98 | b) You must cause any work that you distribute or publish, that in 99 | whole or in part contains or is derived from the Program or any 100 | part thereof, to be licensed as a whole at no charge to all third 101 | parties under the terms of this License. 102 | 103 | c) If the modified program normally reads commands interactively 104 | when run, you must cause it, when started running for such 105 | interactive use in the most ordinary way, to print or display an 106 | announcement including an appropriate copyright notice and a 107 | notice that there is no warranty (or else, saying that you provide 108 | a warranty) and that users may redistribute the program under 109 | these conditions, and telling the user how to view a copy of this 110 | License. (Exception: if the Program itself is interactive but 111 | does not normally print such an announcement, your work based on 112 | the Program is not required to print an announcement.) 113 | 114 | These requirements apply to the modified work as a whole. If 115 | identifiable sections of that work are not derived from the Program, 116 | and can be reasonably considered independent and separate works in 117 | themselves, then this License, and its terms, do not apply to those 118 | sections when you distribute them as separate works. But when you 119 | distribute the same sections as part of a whole which is a work based 120 | on the Program, the distribution of the whole must be on the terms of 121 | this License, whose permissions for other licensees extend to the 122 | entire whole, and thus to each and every part regardless of who wrote it. 123 | 124 | Thus, it is not the intent of this section to claim rights or contest 125 | your rights to work written entirely by you; rather, the intent is to 126 | exercise the right to control the distribution of derivative or 127 | collective works based on the Program. 128 | 129 | In addition, mere aggregation of another work not based on the Program 130 | with the Program (or with a work based on the Program) on a volume of 131 | a storage or distribution medium does not bring the other work under 132 | the scope of this License. 133 | 134 | 3. You may copy and distribute the Program (or a work based on it, 135 | under Section 2) in object code or executable form under the terms of 136 | Sections 1 and 2 above provided that you also do one of the following: 137 | 138 | a) Accompany it with the complete corresponding machine-readable 139 | source code, which must be distributed under the terms of Sections 140 | 1 and 2 above on a medium customarily used for software interchange; or, 141 | 142 | b) Accompany it with a written offer, valid for at least three 143 | years, to give any third party, for a charge no more than your 144 | cost of physically performing source distribution, a complete 145 | machine-readable copy of the corresponding source code, to be 146 | distributed under the terms of Sections 1 and 2 above on a medium 147 | customarily used for software interchange; or, 148 | 149 | c) Accompany it with the information you received as to the offer 150 | to distribute corresponding source code. (This alternative is 151 | allowed only for noncommercial distribution and only if you 152 | received the program in object code or executable form with such 153 | an offer, in accord with Subsection b above.) 154 | 155 | The source code for a work means the preferred form of the work for 156 | making modifications to it. For an executable work, complete source 157 | code means all the source code for all modules it contains, plus any 158 | associated interface definition files, plus the scripts used to 159 | control compilation and installation of the executable. However, as a 160 | special exception, the source code distributed need not include 161 | anything that is normally distributed (in either source or binary 162 | form) with the major components (compiler, kernel, and so on) of the 163 | operating system on which the executable runs, unless that component 164 | itself accompanies the executable. 165 | 166 | If distribution of executable or object code is made by offering 167 | access to copy from a designated place, then offering equivalent 168 | access to copy the source code from the same place counts as 169 | distribution of the source code, even though third parties are not 170 | compelled to copy the source along with the object code. 171 | 172 | 4. You may not copy, modify, sublicense, or distribute the Program 173 | except as expressly provided under this License. Any attempt 174 | otherwise to copy, modify, sublicense or distribute the Program is 175 | void, and will automatically terminate your rights under this License. 176 | However, parties who have received copies, or rights, from you under 177 | this License will not have their licenses terminated so long as such 178 | parties remain in full compliance. 179 | 180 | 5. You are not required to accept this License, since you have not 181 | signed it. However, nothing else grants you permission to modify or 182 | distribute the Program or its derivative works. These actions are 183 | prohibited by law if you do not accept this License. Therefore, by 184 | modifying or distributing the Program (or any work based on the 185 | Program), you indicate your acceptance of this License to do so, and 186 | all its terms and conditions for copying, distributing or modifying 187 | the Program or works based on it. 188 | 189 | 6. Each time you redistribute the Program (or any work based on the 190 | Program), the recipient automatically receives a license from the 191 | original licensor to copy, distribute or modify the Program subject to 192 | these terms and conditions. You may not impose any further 193 | restrictions on the recipients' exercise of the rights granted herein. 194 | You are not responsible for enforcing compliance by third parties to 195 | this License. 196 | 197 | 7. If, as a consequence of a court judgment or allegation of patent 198 | infringement or for any other reason (not limited to patent issues), 199 | conditions are imposed on you (whether by court order, agreement or 200 | otherwise) that contradict the conditions of this License, they do not 201 | excuse you from the conditions of this License. If you cannot 202 | distribute so as to satisfy simultaneously your obligations under this 203 | License and any other pertinent obligations, then as a consequence you 204 | may not distribute the Program at all. For example, if a patent 205 | license would not permit royalty-free redistribution of the Program by 206 | all those who receive copies directly or indirectly through you, then 207 | the only way you could satisfy both it and this License would be to 208 | refrain entirely from distribution of the Program. 209 | 210 | If any portion of this section is held invalid or unenforceable under 211 | any particular circumstance, the balance of the section is intended to 212 | apply and the section as a whole is intended to apply in other 213 | circumstances. 214 | 215 | It is not the purpose of this section to induce you to infringe any 216 | patents or other property right claims or to contest validity of any 217 | such claims; this section has the sole purpose of protecting the 218 | integrity of the free software distribution system, which is 219 | implemented by public license practices. Many people have made 220 | generous contributions to the wide range of software distributed 221 | through that system in reliance on consistent application of that 222 | system; it is up to the author/donor to decide if he or she is willing 223 | to distribute software through any other system and a licensee cannot 224 | impose that choice. 225 | 226 | This section is intended to make thoroughly clear what is believed to 227 | be a consequence of the rest of this License. 228 | 229 | 8. If the distribution and/or use of the Program is restricted in 230 | certain countries either by patents or by copyrighted interfaces, the 231 | original copyright holder who places the Program under this License 232 | may add an explicit geographical distribution limitation excluding 233 | those countries, so that distribution is permitted only in or among 234 | countries not thus excluded. In such case, this License incorporates 235 | the limitation as if written in the body of this License. 236 | 237 | 9. The Free Software Foundation may publish revised and/or new versions 238 | of the General Public License from time to time. Such new versions will 239 | be similar in spirit to the present version, but may differ in detail to 240 | address new problems or concerns. 241 | 242 | Each version is given a distinguishing version number. If the Program 243 | specifies a version number of this License which applies to it and "any 244 | later version", you have the option of following the terms and conditions 245 | either of that version or of any later version published by the Free 246 | Software Foundation. If the Program does not specify a version number of 247 | this License, you may choose any version ever published by the Free Software 248 | Foundation. 249 | 250 | 10. If you wish to incorporate parts of the Program into other free 251 | programs whose distribution conditions are different, write to the author 252 | to ask for permission. For software which is copyrighted by the Free 253 | Software Foundation, write to the Free Software Foundation; we sometimes 254 | make exceptions for this. Our decision will be guided by the two goals 255 | of preserving the free status of all derivatives of our free software and 256 | of promoting the sharing and reuse of software generally. 257 | 258 | NO WARRANTY 259 | 260 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY 261 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN 262 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES 263 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 264 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 265 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS 266 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE 267 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, 268 | REPAIR OR CORRECTION. 269 | 270 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 271 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR 272 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, 273 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING 274 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED 275 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY 276 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER 277 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE 278 | POSSIBILITY OF SUCH DAMAGES. 279 | 280 | END OF TERMS AND CONDITIONS 281 | 282 | How to Apply These Terms to Your New Programs 283 | 284 | If you develop a new program, and you want it to be of the greatest 285 | possible use to the public, the best way to achieve this is to make it 286 | free software which everyone can redistribute and change under these terms. 287 | 288 | To do so, attach the following notices to the program. It is safest 289 | to attach them to the start of each source file to most effectively 290 | convey the exclusion of warranty; and each file should have at least 291 | the "copyright" line and a pointer to where the full notice is found. 292 | 293 | {description} 294 | Copyright (C) {year} {fullname} 295 | 296 | This program is free software; you can redistribute it and/or modify 297 | it under the terms of the GNU General Public License as published by 298 | the Free Software Foundation; either version 2 of the License, or 299 | (at your option) any later version. 300 | 301 | This program is distributed in the hope that it will be useful, 302 | but WITHOUT ANY WARRANTY; without even the implied warranty of 303 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 304 | GNU General Public License for more details. 305 | 306 | You should have received a copy of the GNU General Public License along 307 | with this program; if not, write to the Free Software Foundation, Inc., 308 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 309 | 310 | Also add information on how to contact you by electronic and paper mail. 311 | 312 | If the program is interactive, make it output a short notice like this 313 | when it starts in an interactive mode: 314 | 315 | Gnomovision version 69, Copyright (C) year name of author 316 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 317 | This is free software, and you are welcome to redistribute it 318 | under certain conditions; type `show c' for details. 319 | 320 | The hypothetical commands `show w' and `show c' should show the appropriate 321 | parts of the General Public License. Of course, the commands you use may 322 | be called something other than `show w' and `show c'; they could even be 323 | mouse-clicks or menu items--whatever suits your program. 324 | 325 | You should also get your employer (if you work as a programmer) or your 326 | school, if any, to sign a "copyright disclaimer" for the program, if 327 | necessary. Here is a sample; alter the names: 328 | 329 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program 330 | `Gnomovision' (which makes passes at compilers) written by James Hacker. 331 | 332 | {signature of Ty Coon}, 1 April 1989 333 | Ty Coon, President of Vice 334 | 335 | This General Public License does not permit incorporating your program into 336 | proprietary programs. If your program is a subroutine library, you may 337 | consider it more useful to permit linking proprietary applications with the 338 | library. If this is what you want to do, use the GNU Lesser General 339 | Public License instead of this License. 340 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # recaltools 2 | Toolbox for Recalbox 3 | -------------------------------------------------------------------------------- /fast7ztoZip/README.md: -------------------------------------------------------------------------------- 1 | Convert .7z files to .zip using [7-Zip](http://www.7-zip.org/) Software. 2 | Place fast7ztoZip.bat on the same directory as the .7z files and execute it. -------------------------------------------------------------------------------- /fast7ztoZip/fast7ztoZip.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | setlocal EnableDelayedExpansion 3 | color 3f 4 | set releaseDate=06.11.2016 5 | title fast7ztoZip ver. !releaseDate! 6 | 7 | :7zEXE 8 | rem Check if 7z.exe is installed on the computer 9 | set pf=!programfiles! 10 | if exist !pf!\7-Zip\7z.exe goto reZip 11 | if exist "!pf! (x86)\7-Zip\7z.exe" set "pf=!pf! (x86)" & goto reZip 12 | echo 7-Zip missing 13 | set /p "download=Do you want to open the URL to download it? [Y/N]: " 14 | if /i "!download!"=="y" start http://www.7-zip.org/ & goto:eof 15 | if /i "!download!"=="n" goto:eof 16 | echo Incorrect input & goto 7zEXE 17 | 18 | :reZip 19 | title Converting .7z to .zip... 20 | rem Convert .7z to .zip 21 | for %%f in (*.7z) do ( 22 | "!pf!\7-Zip\7z.exe" x -y -o"%%f_tmp" "%%f" * 23 | pushd %%f_tmp 24 | "!pf!\7-Zip\7z.exe" a -y -r -t7z ..\"%%~nf".zip * 25 | popd 26 | rmdir /s /q "%%f_tmp" 27 | ) 28 | 29 | title fast7ztoZip ver. !releaseDate! - Conversion has finished 30 | pause >nul -------------------------------------------------------------------------------- /fastcompare/README.md: -------------------------------------------------------------------------------- 1 | Check two folders for differences up to one level (no subdirectories). 2 | It is useful, for instance, to find missing or modified files between two ROM Sets. -------------------------------------------------------------------------------- /fastcompare/fastcompare.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | color 3f 3 | set releaseDate=02.01.2017 4 | title fastcompare ver. %releaseDate% 5 | 6 | rem List of excluded extensions 7 | set "excluded=.xml .txt" 8 | 9 | rem Set prefix for output files 10 | set prefixMiss=missing_in_ 11 | set prefixMod=modified_files 12 | 13 | rem Set abbreviation 14 | set "EDE=setlocal EnableDelayedExpansion" 15 | set "DDE=setlocal DisableDelayedExpansion" 16 | 17 | rem Set defaults to launch directory 18 | set rootFolderOld=%~dp0 19 | set rootFolderNew=%~dp0 20 | 21 | :listFoldersOld 22 | rem Show folder names in current directory 23 | echo List of available folders for comparison: 24 | set count=0 25 | set count1=0 26 | for /f "delims=: tokens=1*" %%a in ('dir /b /a:d /o:n ^| findstr /n "."') do ( 27 | set "mapArray[%%a]=%%b" 28 | set "count=%%a" 29 | echo %%a: %%b 30 | ) 31 | 32 | :checkFoldersOld 33 | setlocal EnableDelayedExpansion 34 | if not exist !mapArray[1]! cls & echo No folders found on current directory^^! & goto SUB_folderBrowser 35 | if %count% gtr 0 set /a browser=%count%+1 & echo.!browser!: Open Folder Browser? 36 | if %count% equ 2 echo. & set /p "twoFolders=Compare !mapArray[1]! with !mapArray[2]!? [Y/N]: " 37 | if /i "%twoFolders%"=="y" (set "folderOld=!mapArray[1]!" & set "folderNew=!mapArray[2]!" & goto outputFiles) else goto oldFolder 38 | 39 | :oldFolder 40 | echo. 41 | if exist !folderOld! goto listFoldersNew 42 | rem Select old folder 43 | set type=rootOld 44 | echo Which one is the old folder? Choose %browser% to change directory. 45 | set /p "oldFolder=#: " 46 | if %oldFolder% equ %browser% goto SUB_folderBrowser 47 | setlocal EnableDelayedExpansion 48 | if exist !mapArray[%oldFolder%]! set "folderOld=!mapArray[%oldFolder%]!" & goto listFoldersNew 49 | echo Incorrect input^^! & goto oldFolder 50 | 51 | :listFoldersNew 52 | setlocal DisableDelayedExpansion 53 | rem Show folder names in current directory 54 | if "%type%"=="rootNew" echo List of available folders for comparison: 55 | for /f "delims=: tokens=1*" %%a in ('dir /b /a:d /o:n ^| findstr /n "."') do ( 56 | set "mapArray1[%%a]=%%b" 57 | set "count1=%%a" 58 | if "%type%"=="rootNew" echo %%a: %%b 59 | ) 60 | 61 | :checkFoldersNew 62 | setlocal EnableDelayedExpansion 63 | if not exist !mapArray1[1]! cls & echo No folders found on current directory^^! & goto SUB_folderBrowser 64 | if "%type%"=="rootNew" set /a browser=%count1%+1 & echo.!browser!: Open Folder Browser? & goto newFolder 65 | 66 | :newFolder 67 | echo. 68 | rem Select new folder 69 | set type=rootNew 70 | echo Which one is the new folder you want to compare? Choose %browser% to change directory. 71 | set /p "newFolder=#: " 72 | if %newFolder% equ %browser% goto SUB_folderBrowser 73 | if "%rootFolderNew%!mapArray1[%newFolder%]!"=="%rootFolderOld%!folderOld!" (echo You selected the same folder as before^^! & goto newFolder) 74 | if exist !mapArray1[%newFolder%]! set "folderNew=!mapArray1[%newFolder%]!" & goto outputFiles 75 | echo Incorrect input^^! & echo. & goto newFolder 76 | 77 | :outputFiles 78 | set "outputMod=%~dp0%prefixMod%.txt" 79 | set "outputOld=%~dp0%prefixMiss%!folderOld!.txt" 80 | if "!folderOld!"=="!folderNew!" set "suffix=_^(2^)" 81 | set "outputNew=%~dp0%prefixMiss%!folderNew!%suffix%.txt" 82 | 83 | :modScan 84 | echo. 85 | rem Scan for modified files or only missing files? 86 | set /p "mod=Scan for modified files? [Y/N]: " 87 | if "%mod%"=="y" (echo. & goto modFiles) 88 | if "%mod%"=="n" goto missFilesOld 89 | echo Incorrect input^^! & goto modScan 90 | 91 | :modFiles 92 | rem Look for modified files 93 | setlocal DisableDelayedExpansion 94 | rem Use findstr /n "^" if exclusions cause problems 95 | for /f "delims=: tokens=1*" %%a in ('dir /b /a-d /o:en "%rootFolderNew%%folderNew%\*" ^| findstr /v /i /n "%excluded%"') do ( 96 | title fastcompare ver. %releaseDate% - Scanning %%b 97 | if exist "%rootFolderOld%%folderOld%\%%b" ( 98 | if "%%a"=="1" echo Modified files: 99 | fc "%rootFolderOld%%folderOld%\%%b" "%rootFolderNew%%folderNew%\%%b" >nul || echo %%b >> "%outputMod%" && set /a count2+=1 && echo %%b 100 | ) 101 | ) 102 | 103 | :missFilesOld 104 | rem Look for missing files in oldFolder 105 | setlocal DisableDelayedExpansion 106 | rem Use findstr /n "^" if exclusions cause problems 107 | for /f "delims=: tokens=1*" %%a in ('dir /b /a-d /o:en "%rootFolderNew%%folderNew%\*" ^| findstr /v /i /n "%excluded%"') do ( 108 | title fastcompare ver. %releaseDate% - Scanning %%b 109 | if "%%a"=="1" %EDE% & echo. & echo Files not present in !folderOld!: & %DDE% 110 | if not exist "%rootFolderOld%%folderOld%\%%b" ( 111 | set /a count3+=1 112 | echo %%b >> "%outputOld%" 113 | echo %%b 114 | ) 115 | ) 116 | 117 | :missFilesNew 118 | rem Look for missing files in newFolder 119 | rem Use findstr /n "^" if exclusions cause problems 120 | for /f "delims=: tokens=1*" %%a in ('dir /b /a-d /o:en "%rootFolderOld%%folderOld%\*" ^| findstr /v /i /n "%excluded%"') do ( 121 | title fastcompare ver. %releaseDate% - Scanning %%b 122 | if "%%a"=="1" %EDE% & echo. & echo Files not present in !folderNew!%suffix%: & %DDE% 123 | if not exist "%rootFolderNew%%folderNew%\%%b" ( 124 | set /a count4+=1 125 | echo %%b >> "%outputNew%" 126 | echo %%b 127 | ) 128 | ) 129 | echo. 130 | 131 | rem Results 132 | echo Results: 133 | setlocal EnableDelayedExpansion 134 | if !count2! gtr 0 echo Modified files: !count2! 135 | if !count3! gtr 0 echo Files not present in !folderOld!: !count3! 136 | if !count4! gtr 0 echo Files not present in !folderNew!%suffix%: !count4! 137 | if "!count2!!count3!!count4!"=="" echo !folderOld! and !folderNew!%suffix% are identical^^! 138 | 139 | title fastcompare ver. %releaseDate% - Comparison finished^^! 140 | popd & pause >nul & exit 141 | 142 | :SUB_folderBrowser 143 | setlocal DisableDelayedExpansion 144 | if "%type%"=="rootOld" ( 145 | if %count% lss 1 set /p openBrowser=Open Folder Browser? [Y/N]: " 146 | if %count% lss 1 ( 147 | if not "%openBrowser%"=="y" exit 148 | ) 149 | ) 150 | if "%type%"=="rootNew" ( 151 | if %count1% lss 1 set /p openBrowser=Open Folder Browser? [Y/N]: " 152 | if %count1% lss 1 ( 153 | if not "%openBrowser%"=="y" exit 154 | ) 155 | ) 156 | set count=0 & set count1=0 & echo Opening Folder Browser... & echo. 157 | echo Select the root system folder, not the system itself! 158 | 159 | rem PowerShell-Subroutine to open a Folder Browser 160 | set "psCommand="(new-object -COM 'Shell.Application')^ 161 | .BrowseForFolder(0,'Please choose a folder.',0,0).self.path"" 162 | for /f "usebackq delims=" %%i in (`powershell %psCommand%`) do set "newRoot=%%i" 163 | 164 | if "%type%"=="rootOld" set "rootFolderOld=%newRoot%\" & set "rootFolderNew=%newRoot%\" 165 | if "%type%"=="rootNew" set "rootFolderNew=%newRoot%\" 166 | 167 | rem Change working directory 168 | if "%type%"=="rootOld" cls & pushd %rootFolderOld% & goto listFoldersOld 169 | if "%type%"=="rootNew" cls & pushd %rootFolderNew% & %EDE% & echo Selected old folder: %rootFolderOld%!folderOld! & echo. 170 | echo Current directory: %rootFolderNew% & echo. & goto listFoldersNew 171 | -------------------------------------------------------------------------------- /fastlister/README.md: -------------------------------------------------------------------------------- 1 | fastlister 2 | =================== 3 | 4 | Create lists of files inside chosen directories up to one level. -------------------------------------------------------------------------------- /fastlister/fastlister.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | color 3f 3 | set releaseDate=03.01.2017 4 | title fastlister ver. %releaseDate% 5 | 6 | rem List of excluded extensions 7 | set excluded=.xml .txt 8 | 9 | :listFolders 10 | rem Show folder names in current directory 11 | echo Available folders for listing: 12 | set /a count=0 13 | for /f "delims=: tokens=1*" %%a in ('dir /b /a:d /o:n ^| findstr /n "."') do ( 14 | set "mapArray[%%a]=%%b" 15 | set "count=%%a" 16 | echo %%a: %%b 17 | ) 18 | 19 | :checkFolders 20 | setlocal EnableDelayedExpansion 21 | if not exist !mapArray[1]! cls & echo No folders found on current directory^^! & goto SUB_folderBrowser 22 | if %count% gtr 0 set /a browser=%count%+1 & echo.!browser!: Open Folder Browser? 23 | 24 | :whichFolder 25 | echo. 26 | rem Select folder(s) to be listed 27 | echo The content of which folder(s) do you want to list? All? Choose %browser% to change directory. 28 | set /p "whichFolder=#: " 29 | if "%whichFolder%"=="%browser%" goto SUB_folderBrowser 30 | if /i not "%whichFolder%"=="all" goto validFolders 31 | set "folders=" 32 | for /l %%i in (1,1,%count%) do set folders=!folders! %%i 33 | goto outputFolder 34 | 35 | :validFolders 36 | rem Create string containing all valid corresponding names 37 | set "folders=" 38 | set /a count1=0 39 | for %%i in (%whichFolder%) do ( 40 | if exist !mapArray[%%i]! (set folders=!folders! %%i & set /a count1+=1) else echo %%i is not a valid number^^! 41 | ) 42 | 43 | rem Check if input matched at least one folder 44 | if %count1% gtr 0 goto outputFolder 45 | echo Your input did not match any folder, try again^^! & echo. & goto whichFolder 46 | 47 | :outputFolder 48 | rem Create output folder 49 | set destFolder=bestLists 50 | if not exist "%~dp0%destFolder%" md "%~dp0%destFolder%" 51 | 52 | :listContent 53 | echo. 54 | 55 | title fastlister ver. %releaseDate% - Creating lists... 56 | for %%f in (%folders%) do ( 57 | cd !mapArray[%%f]! && echo Scanning !mapArray[%%f]!... 58 | dir /b /a:-d /o:en 2>nul | findstr /v /i "%excluded%" >> "%~dp0%destFolder%\!mapArray[%%f]!.txt" 59 | cd .. 60 | ) 61 | 62 | rem Detect and delete empty files on output folder 63 | echo. 64 | setlocal DisableDelayedExpansion 65 | for %%f in ("%~dp0%destFolder%\*") do ( 66 | if %%~zf equ 0 echo %%~nf has no elements to list. & del "%%f" 67 | ) 68 | 69 | rem Delete output folder if empty 70 | echo. 71 | dir /a:-d "%~dp0%destFolder%\*" >nul 2>nul && (echo Find the lists inside bestLists folder!) || (rd "%~dp0%destFolder%" & echo No lists created!) 72 | 73 | title fastlister ver. %releaseDate% - Scanning directories finished! 74 | 75 | popd & pause >nul & exit 76 | 77 | :SUB_folderBrowser 78 | setlocal DisableDelayedExpansion 79 | if %count% lss 2 set /p "openBrowser=Open Folder Browser? [Y/N]: " 80 | if %count% lss 2 ( 81 | if not "%openBrowser%"=="y" exit 82 | ) 83 | set count=0 & echo Opening Folder Browser... & echo. 84 | 85 | rem PowerShell-Subroutine to open a Folder Browser 86 | set "psCommand="(new-object -COM 'Shell.Application')^ 87 | .BrowseForFolder(0,'Please choose a folder.',0,0).self.path"" 88 | for /f "usebackq delims=" %%i in (`powershell %psCommand%`) do set "newRoot=%%i" 89 | 90 | rem Change working directory 91 | cls & pushd %newRoot% & goto listFolders 92 | -------------------------------------------------------------------------------- /fastscraper/README.md: -------------------------------------------------------------------------------- 1 | Script to facilitate the use of [sselph's scraper](https://github.com/sselph/scraper/releases). 2 | 3 | Place fastscraper[.bat] on your rom's root directory. The script will automatically download/update the scraper if needed. 4 | Windows users need fastscraper.bat 5 | Linux, macOS or FreeBSD users need to set appropriate permissions: `chmod u+x ./fastscraper` 6 | 7 | **Don't forget to set your [ScreenScraper](http://screenscraper.fr/) *username* and *password* to scrape faster!!!** 8 | 9 | I used the following commands to mount recalbox's share partition and scrape over the network. Scraping directly from the Pi is very slow! (Tested on Ubuntu) 10 | 11 | * First prepare the mount point (unless it already exists): 12 | `sudo mkdir /mnt/recalbox` 13 | 14 | * Then mount the network share: 15 | ``` 16 | sudo mount -t cifs ///share/ /mnt/recalbox -o username=root,password=recalboxroot,uid=1000,gid=1000 17 | ``` 18 | 19 | * To unmount the share just do: 20 | `sudo umount /mnt/recalbox` 21 | -------------------------------------------------------------------------------- /fastscraper/fastscraper: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | releaseDate=31.01.2018 3 | echo "fastscraper ver. $releaseDate" 4 | 5 | # Set ScreenScraper credentials 6 | username="" 7 | password="" 8 | 9 | # Dictionary (auto, es, de, fr, en) 10 | lang=auto 11 | 12 | # Flags - Static parameters 13 | # If true, add roms that are not found as an empty gamelist entry. 14 | addNotFound=-add_not_found=false 15 | 16 | # Comma-separated order to prefer images, s=snapshot, b=boxart, f=fanart, a=banner, l=logo, 3b=3D boxart, cart=cartridge, clabel=cartridge label, mix3=Standard 3 mix, mix4=Standard 4 mix. (default "b") 17 | consoleImg=-console_img="mix3,b,s" 18 | 19 | # Comma-separated order to prefer console sources, ss=screenscraper, ovgdb=OpenVGDB, gdb=theGamesDB (default "gdb") 20 | consoleSrc=-console_src="ss" 21 | 22 | # If true, convert videos for the Raspberry Pi (e.g. 320x240@30fps) NOTE: This needs ffmpeg installed 23 | convertVideo=-convert_videos="true" 24 | 25 | # If false, don't download any images, instead see if the expected file is stored locally already. (default true) 26 | downloadImg=-download_images="true" 27 | 28 | # If true, download marquees. 29 | downloadMarquee=-download_marquees="false" 30 | 31 | # If true, download videos. 32 | downloadVideo=-download_videos="false" 33 | 34 | # Comma separated list of extensions to also include in the scraper. 35 | extraExt=-extra_ext=".scummvm,.ipf,.mx1,.mx2,.exe,.ws,.wsc,.wad,.dsk,.tap,.trd,.tzx,.z80,.p,.a0,.crt,.nib,.do,.po" 36 | 37 | # jpg or png, the format to write the images. (default "jpg") 38 | imgFormat=-img_format="png" 39 | 40 | # The path to use for images in gamelist.xml. (default "images") 41 | imagePath=-image_path="./downloaded_images" 42 | 43 | # The suffix added after rom name when creating image files. (default "-image") 44 | imageSuffix=-image_suffix="-image" 45 | 46 | # The order to choose for language if there is more than one for a value. (en, fr, es, de, pt) (default "en") 47 | langSS=-lang="en,es,pt,de,fr" 48 | 49 | # Comma-separated order to prefer images, s=snap, t=title, m=marquee, c=cabinet, b=boxart, 3b=3D-boxart, fly=flyer. (default "t,m,s,c") 50 | mameImg=-mame_img="b,s,fly,m,t" 51 | 52 | # Comma-separated order to prefer mame sources, ss=screenscraper, adb=arcadeitalia, mamedb=mamedb-mirror, gdb=theGamesDB-neogeo (default "adb,gdb") 53 | mameSrc=-mame_src="ss" 54 | 55 | # jpg or png, the format to write the marquees. (default "png") 56 | marqueeFormat=-marquee_format="png" 57 | 58 | # The path to use for marquees in gamelist.xml. (default "images") 59 | marqueePath=-marquee_path="./downloaded_images" 60 | 61 | # The suffix added after rom name when creating marquee files. (default "-marquee") 62 | marqueeSuffix=-marquee_suffix="-marquee" 63 | 64 | # The max height of images. Larger images will be resized. 65 | maxHeight=-max_height=0 66 | 67 | # The max width of images. Larger images will be resized. (default 400) 68 | maxWidth=-max_width=400 69 | 70 | # Don't add thumbnails to the gamelist. 71 | noThumb=-no_thumb=true 72 | 73 | # Download the thumbnail for both the image and thumb (faster). (default "false") 74 | thumbOnly=-thumb_only=false 75 | 76 | # Information will be attempted to be downloaded again but won't remove roms that are not scraped. 77 | refreshXML=-refresh=false 78 | 79 | # The order to choose for region if there is more than one for a value. xx is a special region that will choose any region. (default "us,wor,eu,jp,fr,xx") 80 | regionSS=-region="us,wor,eu,jp,fr,xx" 81 | 82 | # The `username` for registered ScreenScraper users. 83 | username=-ss_user=$username 84 | 85 | # The `password` for registered ScreenScraper users. 86 | password=-ss_password=$password 87 | 88 | # If true, use the filename minus the extension as the game title in xml. 89 | useFilename=-use_filename=false 90 | 91 | # Use the name in the No-Intro DB instead of the one in the GDB. (default true) 92 | useNoIntroName=-use_nointro_name=true 93 | 94 | # The path to use for videos in gamelist.xml. (default "images") 95 | videoPath=-video_path="./downloaded_images" 96 | 97 | # The suffix added after rom name when creating video files. (default "-video") 98 | videoSuffix=-video_suffix="-video" 99 | 100 | # Use N worker threads to process roms. (default 1) 101 | workersN=-workers=4 102 | 103 | # Create dictionary 104 | # Get OS's language 105 | if [ -f "/recalbox/share/system/recalbox.conf" ]; then 106 | language=$(grep '^system.language' /recalbox/share/system/recalbox.conf | cut -d '=' -f 2 | cut -d '_' -f 1) 107 | else 108 | language=$(locale | grep 'LANG=' | cut -d '=' -f2 | cut -d '"' -f2 | cut -d '_' -f1) 109 | fi 110 | 111 | # Select dictionary 112 | if [[ "$lang" =~ ^(es|de|fr|en)$ ]]; then language=$lang; fi 113 | case $language in 114 | es) 115 | dict=('ERROR: Sin conexión a internet. Saliendo...' 'no es una plataforma soportada.' 'ERROR: Imposible descargar el scraper. Saliendo...' 'ERROR: Imposible descomprimir el scraper. Saliendo...' 'ERROR: Imposible comprobar actualizaciones en GitHub.' 'Actualizando sselph scraper de' 'a' ', espere por favor...' 'Descargando sselph scraper' 'Abriendo Explorador de Carpetas...' 'Explorador de Carpetas para' ' aun no implementado, lo siento!' 'Carpeta de roms seleccionada:' 'No olvides detener EmulationStation antes de scrapear!' '¿Qué sistema(s) desea scrapear? Escriba "all" para todos los sistemas o "cd" para abrir el navegador de carpetas.' 'Entrada incorrecta!' '¿Deseas anexar los gamelists existentes? [Y/N]:' 'Scrapeando' 'en progreso. Espere por favor...' 'Inicio' 'Fin' 'Duración' 'Por favor, seleccione la carpeta de roms.' 'Scrapeado finalizado!') ;; 116 | de) 117 | dict=('FEHLER: Keine Internetverbindung verfügbar. Beenden...' 'ist kein unterstütztes Betriebssystem.' 'FEHLER: Scraper konnte nicht heruntergeladet werden. Beenden...' 'FEHLER: Scraper konnte nicht entpackt werden. Beenden...' 'FEHLER: Suche nach Updates auf GitHub fehlgeschlagen.' 'Update sselph scraper von' 'auf' ' wird durchgeführt, bitte warten...' 'Download sselph scraper' 'Öffne Ordner Browser...' 'Ordner Browser für' 'noch nicht implementiert, entschuldige!' 'Ausgewählter roms Ordner:' 'Vergiss nicht EmulationStation vor dem Scrapen zu beenden!' 'Welche(s) System(e) möchtest du scrapen? Tippe "all" für alle Systeme oder "cd", um den Ordner Browser zu öffnen.' 'Ungültige Eingabe!' 'Möchtest du die bestehende gamelists erweitern? [Y/N]:' 'Scrapen' 'in Arbeit. Bitte warten...' 'Beginn' 'Ende' 'Dauer' 'Bitte wählen Sie den Ordner roms' 'Scrapen ist beendet!') ;; 118 | fr) 119 | dict=('ERREUR : Pas de connexion internet disponible. Quitter...' "n'est pas une plateforme prise en charge." 'ERREUR : Impossible de télécharger le scraper. Quitter...' 'ERREUR : Impossible de décompresser le scraper. Quitter...' 'ERREUR : Impossible de rechercher les mises à jour sur GitHub.' 'La mise à jour de sselph scraper de' 'à' ', veuillez patienter...' 'Le téléchargement sselph scraper' 'Ouverture du Navigateur de Dossier...' 'Navigateur de Dossier pour' 'pas encore mis en oeuvre, désolé !' 'Dossier roms sélectionné :' "N'oubliez pas d'arrêter de EmulationStation avant de scrapez !" 'Quel(s) système(s) souhaitez-vous scrapez ? Tapez « all » pour tous les systèmes ou « cd » pour ouvrir le dossier du navigateur.' 'Entrée incorrecte !' 'Vous souhaitez ajouter les gamelists ? [Y/N] :' 'Scrapez' 'en course. Veuillez patienter...' 'Démarrer' 'Terminer' 'Durée' 'Veuillez choisir le dossier de roms' 'Scrapez est terminé !') ;; 120 | *) 121 | if [ ! "$language" == "en" ]; then echo "Can't get OS's language. English will be used."; fi; 122 | dict=('ERROR: No internet connection available. Exiting...' 'is not a supported platform.' 'ERROR: Unable to download the scraper. Exiting...' "ERROR: Couldn't unzip the scraper. Exiting..." 'ERROR: Unable to check for updates on GitHub.' 'Updating sselph scraper from' 'to' ', please wait...' 'Downloading sselph scraper' 'Opening Folder Browser...' 'Folder Browser for' 'not implemented yet, sorry!' 'Selected roms folder:' "Don't forget to stop EmulationStation before scraping!" "Which system(s) do you want to scrape? Type "all" for all systems or "cd" to open the folder browser." 'Incorrect input!' 'Would you like to append existing gamelists? [Y/N]:' 'Scraping' 'in progress. Please wait...' 'Start' 'Finish' 'Duration' 'Please choose the roms folder.' 'Scraping has finished!') ;; 123 | esac 124 | 125 | # Check internet connection 126 | uname -m | grep 'arm' >/dev/null && ping -q -c 1 -W 1 8.8.8.8 >/dev/null 2>&1 || nc -z 8.8.8.8 53 >/dev/null 2>&1 127 | if [ ! $? -eq 0 ]; then echo "${dict[0]}"; exit 1; fi 128 | 129 | # Set default roms directory to launch directory 130 | romsDir=$(pwd) 131 | scriptPath=$(pwd) 132 | 133 | # Function to download the latest scraper version 134 | download_scraper() 135 | { 136 | # Detect OS architecture 137 | if [ $(uname -m) == "armv7l" ]; then arch=rpi2; 138 | elif [ $(uname -m) == "armv6l" ]; then 139 | arch=rpi 140 | thumbOnly=-thumb_only=true 141 | workersN=-workers=1 142 | elif [ $(uname -m) == "x86_64" ]; then arch=amd64; 143 | else arch=386; fi 144 | 145 | # Detect OS platform 146 | if [[ $(uname) == 'Linux' ]]; then 147 | platform='linux' 148 | elif [[ $(uname) == 'Darwin' ]]; then 149 | platform='mac' 150 | elif [[ $(uname) == 'FreeBSD' ]]; then 151 | platform='freebsd' 152 | else 153 | echo "$(uname) ${dict[1]}" 154 | exit 1 155 | fi 156 | 157 | # Build the file name, download url and download the file to the current location 158 | if [[ $arch = "rpi2" || $arch = "rpi" ]]; then 159 | scraperZip=scraper_${arch}.zip 160 | else 161 | scraperZip=scraper_${platform}_${arch}.zip 162 | fi 163 | scraperURL=https://github.com/sselph/scraper/releases/download/${scraperVersion}/${scraperZip} 164 | curl -s -LOk $scraperURL || { echo "${dict[2]}"; exit 1; } 165 | 166 | # Unzip the scraper, remove unnecessary files and set appropriate permissions 167 | unzip -o -q $scraperZip scraper || { echo "${dict[3]}"; exit 1; } 168 | rm $scraperZip 169 | chmod u+x ./scraper 170 | echo "" 171 | } 172 | 173 | # scraperBIN 174 | # Query the API to get the latest release tag 175 | scraperVersion=$(curl -s https://api.github.com/repos/sselph/scraper/releases/latest | grep tag_name | cut -d '"' -f 4) 176 | 177 | # Download or update scraper if needed 178 | if [ -f "./scraper" ]; then 179 | chmod u+x ./scraper 180 | if [ "$(./scraper -version)" \< "$scraperVersion" ]; then 181 | if [ "$scraperVersion" = "" ]; then 182 | echo "${dict[4]}" 183 | echo "" 184 | else 185 | echo "${dict[5]} $(./scraper -version) ${dict[6]} $scraperVersion${dict[7]}" 186 | download_scraper 187 | fi 188 | fi 189 | else 190 | echo "${dict[8]} $scraperVersion${dict[7]}" 191 | download_scraper 192 | fi 193 | 194 | # Function to open a folder browser depending on the OS 195 | folder_browser() 196 | { 197 | echo "" 198 | echo "${dict[9]}" 199 | case "$OSTYPE" in 200 | darwin*) echo "${dict[10]} macOS ${dict[11]}" ;; 201 | freebsd*) echo "${dict[10]} FreeBSD ${dict[11]}!" ;; 202 | linux*) romsDir=`zenity --file-selection --directory --title="${dict[22]}"` ;; 203 | esac 204 | 205 | # Check if scraping from network drive and show warning about stopping ES 206 | cd "$romsDir" && echo "${dict[12]} $romsDir" 207 | if [[ $(df "$romsDir" | grep '^//') == "//"* ]]; then echo "${dict[13]}"; fi 208 | echo "" 209 | } 210 | 211 | # systemSelection 212 | # Select the system to scrape (type "all" to scrape all folders) 213 | while true; do 214 | echo "${dict[14]}" 215 | read system 216 | if [ "$system" = "" ]; then echo "${dict[15]}"; 217 | elif [ "$system" = "cd" ]; then folder_browser; 218 | elif [ ! "$system" = "all" ]; then break; 219 | else 220 | system=$(find * -prune -type d | while read d; do echo "$d"; done) && break 221 | fi 222 | done 223 | 224 | # modeSelection 225 | # Choose to append an existing (y) or create a new gamelist (n) 226 | while true; do 227 | if [ "$refreshXML" = "-refresh=true" ]; then appendMode="" && break; fi 228 | read -p "${dict[16]} " appendXML 229 | if [[ "$appendXML" = "y" || "$appendXML" = "Y" ]]; then appendMode=-append && break; fi 230 | if [[ "$appendXML" = "n" || "$appendXML" = "N" ]]; then appendMode="" && break; fi 231 | echo "${dict[15]}" 232 | done 233 | 234 | # startTime 235 | # Save start time 236 | startTime=$(date +"%T") 237 | SECONDS=0 238 | 239 | # ******************** MAIN CODE SECTION 240 | 241 | for i in $system; do 242 | 243 | # Check if mame device is selected and set corresponding flags 244 | arcade="" 245 | if [[ "$i" == *"arcade"* ]]; then arcade="-mame $mameImg $mameSrc"; fi 246 | if [[ "$i" == *"fba"* ]]; then arcade="-mame $mameImg $mameSrc"; fi 247 | if [[ "$i" == *"mame"* ]]; then arcade="-mame $mameImg $mameSrc"; fi 248 | if [[ "$i" == *"neogeo"* ]]; then arcade="-mame $mameImg $mameSrc"; fi 249 | 250 | # If mame device, consoleImg not used 251 | if [ ! "$arcade" = "" ]; then consoleImg=""; fi 252 | 253 | echo "" 254 | 255 | # Scraping roms 256 | echo "${dict[17]} $i ${dict[18]}" 257 | echo "" 258 | "$scriptPath/scraper" $appendMode $arcade -rom_dir="$i" $imagePath -image_dir="$i/${imagePath:14}" $imageSuffix $marqueePath -marquee_dir="$i/${marqueePath:16}" $marqueeSuffix $videoPath -video_dir="$i/${videoPath:14}" $videoSuffix $convertVideo -output_file="$i/gamelist.xml" -missing="$i/_${i}_missing.txt" $addNotFound $consoleImg $consoleSrc $downloadImg $downloadMarquee $downloadVideo $extraExt $imgFormat $marqueeFormat $langSS $maxHeight $maxWidth $noThumb $thumbOnly $refreshXML $regionSS $username $password $useFilename $useNoIntroName $workersN 259 | echo "" 260 | done 261 | 262 | # ******************** END MAIN CODE SECTION 263 | 264 | # Save finish time 265 | endTime=$(date +"%T") 266 | DURATION=$SECONDS 267 | 268 | # Format the results for output 269 | hh=$(($DURATION / 3600)); mm=$((($DURATION / 60) % 60)); ss=$(($DURATION % 60)) 270 | if [ $hh -lt 10 ]; then hh=0$hh; fi 271 | if [ $mm -lt 10 ]; then mm=0$mm; fi 272 | if [ $ss -lt 10 ]; then ss=0$ss; fi 273 | 274 | DURATION=$hh:$mm:$ss 275 | 276 | echo "${dict[19]} : $startTime" 277 | echo "${dict[20]} : $endTime" 278 | echo " ------------" 279 | echo "${dict[21]} : $DURATION" 280 | 281 | echo "" 282 | exit 0 283 | -------------------------------------------------------------------------------- /fastscraper/fastscraper.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | color 3f 3 | set releaseDate=31.01.2018 4 | title fastscraper ver. %releaseDate% 5 | 6 | rem Set ScreenScraper credentials 7 | set username="" 8 | set password="" 9 | 10 | rem Dictionary (auto, es, de, fr, en) 11 | set lang=auto 12 | 13 | rem Flags - Static parameters 14 | rem If true, add roms that are not found as an empty gamelist entry. 15 | set addNotFound=-add_not_found=false 16 | 17 | rem Comma-separated order to prefer images, s=snapshot, b=boxart, f=fanart, a=banner, l=logo, 3b=3D boxart, cart=cartridge, clabel=cartridge label, mix3=Standard 3 mix, mix4=Standard 4 mix. (default "b") 18 | set consoleImg=-console_img="mix3,b,s" 19 | 20 | rem Comma-separated order to prefer console sources, ss=screenscraper, ovgdb=OpenVGDB, gdb=theGamesDB (default "gdb") 21 | set consoleSrc=-console_src="ss" 22 | 23 | rem If true, convert videos for the Raspberry Pi (e.g. 320x240@30fps) NOTE: This needs ffmpeg installed 24 | set convertVideo=-convert_videos="true" 25 | 26 | rem If false, don't download any images, instead see if the expected file is stored locally already. (default true) 27 | set downloadImg=-download_images="true" 28 | 29 | rem If true, download marquees. 30 | set downloadMarquee=-download_marquees="false" 31 | 32 | rem If true, download videos. 33 | set downloadVideo=-download_videos="false" 34 | 35 | rem Comma-separated list of extensions to also include in the scraper. 36 | set extraExt=-extra_ext=".scummvm,.ipf,.mx1,.mx2,.exe,.ws,.wsc,.wad,.dsk,.tap,.trd,.tzx,.z80,.p,.a0,.crt,.nib,.do,.po" 37 | 38 | rem jpg or png, the format to write the images. (default "jpg") 39 | set imgFormat=-img_format="png" 40 | 41 | rem The path to use for images in gamelist.xml. (default "images") 42 | set imagePath=-image_path="./downloaded_images" 43 | 44 | rem The suffix added after rom name when creating image files. (default "-image") 45 | set imageSuffix=-image_suffix="-image" 46 | 47 | rem The order to choose for language if there is more than one for a value. (en, fr, es, de, pt) (default "en") 48 | set langSS=-lang="en,es,pt,de,fr" 49 | 50 | rem Comma-separated order to prefer images, s=snap, t=title, m=marquee, c=cabinet, b=boxart, 3b=3D-boxart, fly=flyer. (default "t,m,s,c") 51 | set mameImg=-mame_img="b,s,fly,m,t" 52 | 53 | rem Comma-separated order to prefer mame sources, ss=screenscraper, adb=arcadeitalia, mamedb=mamedb-mirror, gdb=theGamesDB-neogeo (default "adb,gdb") 54 | set mameSrc=-mame_src="ss" 55 | 56 | rem jpg or png, the format to write the marquees. (default "png") 57 | set marqueeFormat=-marquee_format="png" 58 | 59 | rem The path to use for marquees in gamelist.xml. (default "images") 60 | set marqueePath=-marquee_path="./downloaded_images" 61 | 62 | rem The suffix added after rom name when creating marquee files. (default "-marquee") 63 | set marqueeSuffix=-marquee_suffix="-marquee" 64 | 65 | rem The max height of images. Larger images will be resized. 66 | set maxHeight=-max_height=0 67 | 68 | rem The max width of images. Larger images will be resized. (default 400) 69 | set maxWidth=-max_width=400 70 | 71 | rem Don't add thumbnails to the gamelist. 72 | set noThumb=-no_thumb=true 73 | 74 | rem Download the thumbnail for both the image and thumb (faster). (default "false") 75 | set thumbOnly=-thumb_only=false 76 | 77 | rem Information will be attempted to be downloaded again but won't remove roms that are not scraped. 78 | set refreshXML=-refresh=false 79 | 80 | rem The order to choose for region if there is more than one for a value. xx is a special region that will choose any region. (default "us,wor,eu,jp,fr,xx") 81 | set regionSS=-region="us,wor,eu,jp,fr,xx" 82 | 83 | rem The `username` for registered ScreenScraper users. 84 | set username=-ss_user=%username% 85 | 86 | rem The `password` for registered ScreenScraper users. 87 | set password=-ss_password=%password% 88 | 89 | rem If true, use the filename minus the extension as the game title in xml. 90 | set useFilename=-use_filename=false 91 | 92 | rem Use the name in the No-Intro DB instead of the one in the GDB. (default true) 93 | set useNoIntroName=-use_nointro_name=true 94 | 95 | rem The path to use for videos in gamelist.xml. (default "images") 96 | set videoPath=-video_path="./downloaded_images" 97 | 98 | rem The suffix added after rom name when creating video files. (default "-video") 99 | set videoSuffix=-video_suffix="-video" 100 | 101 | rem Use N worker threads to process roms. (default 1) 102 | set workersN=-workers=4 103 | 104 | rem Create dictionary 105 | rem Change the code page to Unicode/65001 106 | chcp 65001 >nul 107 | 108 | rem Get OS's language 109 | if not "%lang%"=="auto" goto selectDictionary 110 | for /F "tokens=3" %%a in ('reg Query "HKCU\Control Panel\Desktop" /V PreferredUILanguages ^| find "PreferredUILanguages"') do set language=%%a 111 | set language=%language:~0,-3% 112 | 113 | :selectDictionary 114 | rem Select dictionary 115 | for %%a in (es de fr en) do ( 116 | if "%%a"=="%lang%" set language=%lang% 117 | ) 118 | if "%language%"=="es" goto es 119 | if "%language%"=="de" goto de 120 | if "%language%"=="fr" goto fr 121 | goto * 122 | 123 | :es 124 | set "dict=ERROR: Sin conexión a internet. Saliendo...;no es una plataforma soportada.;ERROR: Imposible descargar el scraper. Saliendo...;ERROR: Imposible descomprimir el scraper. Saliendo...;ERROR: Imposible comprobar actualizaciones en GitHub.;Actualizando sselph scraper de;a;, espere por favor...;Descargando sselph scraper;Abriendo Explorador de Carpetas...;Explorador de Carpetas para;aun no implementado, lo siento!;Carpeta de roms seleccionada:;No olvides detener EmulationStation antes de scrapear!;¿Qué sistema(s) desea scrapear? Escribe "all" para todos los sistemas o "cd" para abrir el navegador de carpetas.;Entrada incorrecta!;¿Deseas anexar los gamelists existentes? [Y/N]:;Scrapeando;en progreso. Espere por favor...;Inicio;Fin;Duración;Por favor, seleccione la carpeta de roms; Scrapeado finalizado!" & goto createDict 125 | :de 126 | set "dict=FEHLER: Keine Internetverbindung verfügbar. Beenden...;ist kein unterstütztes Betriebssystem.;FEHLER: Scraper konnte nicht heruntergeladet werden. Beenden...;FEHLER: Scraper konnte nicht entpackt werden. Beenden...;FEHLER: Suche nach Updates auf GitHub fehlgeschlagen.;Update sselph scraper von;auf; wird durchgeführt, bitte warten...;Download sselph scraper;Öffne Ordner Browser...;Ordner Browser für;noch nicht implementiert, entschuldige!;Ausgewählter roms Ordner:;Vergiss nicht EmulationStation vor dem Scrapen zu beenden!;Welche(s) System(e) möchtest du scrapen? Tippe "all" für alle Systeme oder "cd", um den Ordner Browser zu öffnen.;Ungültige Eingabe!;Möchtest du die bestehende gamelists erweitern? [Y/N]:;Scrapen;in Arbeit. Bitte warten...;Beginn;Ende;Dauer;Bitte wählen Sie den Ordner roms;Scrapen ist beendet!" & goto createDict 127 | :fr 128 | set "dict=ERREUR : Pas de connexion internet disponible. Quitter...;n'est pas une plateforme prise en charge.;ERREUR : Impossible de télécharger le scraper. Quitter...;ERREUR : Impossible de décompresser le scraper. Quitter...;ERREUR : Impossible de rechercher les mises à jour sur GitHub.;La mise à jour de sselph scraper de;à;, veuillez patienter...;Le téléchargement sselph scraper;Ouverture du Navigateur de Dossier...;Navigateur de Dossier pour;pas encore mis en oeuvre, désolé !;Dossier roms sélectionné :;N'oubliez pas d'arrêter de EmulationStation avant de scrapez !;Quel(s) système(s) souhaitez-vous scrapez ? Tapez « all » pour tous les systèmes ou « cd » pour ouvrir le dossier du navigateur.;Entrée incorrecte !;Vous souhaitez ajouter les gamelists ? [Y/N] :;Scrapez;en course. Veuillez patienter...;Démarrer;Terminer;Durée;Veuillez choisir le dossier de roms;Scrapez est terminé !" & goto createDict 129 | :* 130 | if not "%language%"=="en" echo Can't get OS's language. English will be used. 131 | set "dict=ERROR: No internet connection available. Exiting...;is not a supported platform.;ERROR: Unable to download the scraper. Exiting...;ERROR: Couldn't unzip the scraper. Exiting...;ERROR: Unable to check for updates on GitHub.;Updating sselph scraper from;to;, please wait...;Downloading sselph scraper;Opening Folder Browser...;Folder Browser for;not implemented yet, sorry!;Selected roms folder:;Don't forget to stop EmulationStation before scraping!;Which system(s) do you want to scrape? Type "all" for all systems or "cd" to open the folder browser.;Incorrect input!;Would you like to append existing gamelists? [Y/N]:;Scraping;in progress. Please wait...;Start;Finish;Duration;Please choose the roms folder;Scraping has finished!" 132 | 133 | :createDict 134 | set /A count=-1 135 | call :parseDict "%dict%" 136 | 137 | :parseDict 138 | set /A count+=1 139 | for /F "tokens=1* delims=;" %%i in ("%~1") do ( 140 | set dict[%count%]=%%i 141 | call :parseDict "%%j" 142 | ) 143 | 144 | rem Check internet connection 145 | ping 8.8.8.8 -n 1 -w 1000 >nul 146 | if errorlevel 1 echo %dict[0]% & pause >nul & exit 147 | 148 | rem Set default roms directory to launch directory 149 | set "romsDir=%cd%" 150 | 151 | :scraperEXE 152 | rem Detect OS architecture 153 | reg Query "HKLM\Hardware\Description\System\CentralProcessor\0" | find /I "x86" >nul && set arch=386 || set arch=amd64 154 | 155 | rem Query the API to get the latest tag 156 | set "Uri=https://api.github.com/repos/sselph/scraper/releases/latest" 157 | for /F "delims=" %%a in ('PowerShell Invoke-RestMethod -Method Get -Uri %Uri% ^| find /I "tag_name"') do ( 158 | for /F "tokens=3" %%b in ("%%a") do set scraperVersion=%%b 159 | ) 160 | 161 | rem Download or update scraper if needed 162 | if exist "scraper.exe" ( 163 | for /F "tokens=* usebackq" %%a in (`scraper.exe -version`) do ( 164 | if "%%a" GEQ "%scraperVersion%" goto systemSelection 165 | if "%scraperVersion%"=="" echo %dict[4]% & echo. & goto systemSelection 166 | echo %dict[5]% %%a %dict[6]% %scraperVersion%%dict[7]% & echo. 167 | ) 168 | ) else echo %dict[8]% %scraperVersion%%dict[7]% & echo. 169 | 170 | rem Build the file name, download url and download the file to the current location 171 | set scraperZip=scraper_windows_%arch%.zip 172 | set scraperURL=https://github.com/sselph/scraper/releases/download/%scraperVersion%/%scraperZip% 173 | PowerShell (New-Object System.Net.WebClient).DownloadFile('%scraperURL%', '%~dp0%scraperZip%') 174 | 175 | rem Unzip the scraper and remove unnecessary files 176 | if exist "%scraperZip%" ( 177 | PowerShell Expand-Archive -Path '%scraperZip%' -DestinationPath '.\' -Force 178 | del LICENSE.txt %scraperZip% 179 | ) else echo %dict[2]% & pause >nul & exit 180 | 181 | :systemSelection 182 | rem Select the system to scrape (type "all" to scrape all folders) 183 | setlocal EnableDelayedExpansion 184 | echo %dict[14]% 185 | set /P "system=" 186 | if "%system%"=="cd" goto SUB_folderBrowser 187 | if "%system%"=="" echo %dict[15]% & goto systemSelection 188 | if /I not "%system%"=="all" goto modeSelection 189 | set "system=" 190 | for /F "delims=" %%f in ('dir /B /A:D') do set system=!system! %%f 191 | 192 | :modeSelection 193 | rem Choose to append an existing (y) or create a new gamelist (n) 194 | if "%refreshXML%"=="-refresh=true" goto fullMode 195 | set /P "appendXML=%dict[16]% " 196 | if /I "%appendXML%"=="y" goto appendMode 197 | if /I "%appendXML%"=="n" goto fullMode 198 | echo %dict[15]% & goto modeSelection 199 | 200 | :appendMode 201 | set appendMode=-append & goto startTime 202 | 203 | :fullMode 204 | set "appendMode=" 205 | 206 | :startTime 207 | rem Save start time 208 | set startTime=%time% 209 | 210 | rem ******************** MAIN CODE SECTION 211 | 212 | for %%i in (%system%) do ( 213 | 214 | rem Check if mame device is selected and set corresponding flags 215 | set "arcade=" 216 | echo %%i | findstr /LIC:"arcade" >nul && set arcade=-mame %mameImg% %mameSrc% 217 | echo %%i | findstr /LIC:"fba" >nul && set arcade=-mame %mameImg% %mameSrc% 218 | echo %%i | findstr /LIC:"mame" >nul && set arcade=-mame %mameImg% %mameSrc% 219 | echo %%i | findstr /LIC:"neogeo" >nul && set arcade=-mame %mameImg% %mameSrc% 220 | 221 | rem If mame device, consoleImg not used 222 | if not "!arcade!"=="" set "consoleImg=" 223 | 224 | echo. 225 | title fastscraper ver. %releaseDate% - %dict[17]% %%i... 226 | 227 | rem Scraping roms 228 | echo %dict[17]% %%i %dict[18]% 229 | echo. 230 | "%~dp0scraper.exe" %appendMode% !arcade! -rom_dir="%%i" %imagePath% -image_dir="%%i\%imagePath:~15,-1%" %imageSuffix% %marqueePath% -marquee_dir="%%i\%marqueePath:~17,-1%" %marqueeSuffix% %videoPath% -video_dir="%%i\%videoPath:~15,-1%" %videoSuffix% %convertVideo% -output_file="%%i\gamelist.xml" -missing="%%i\_%%i_missing.txt" %addNotFound% !consoleImg! %consoleSrc% %downloadImg% %downloadMarquee% %downloadVideo% %extraExt% %imgFormat% %marqueeFormat% %langSS% %maxHeight% %maxWidth% %noThumb% %thumbOnly% %refreshXML% %regionSS% %username% %password% %useFilename% %useNoIntroName% %workersN% 231 | echo. 232 | 233 | ) 234 | 235 | rem ******************** END MAIN CODE SECTION 236 | 237 | setlocal DisableDelayedExpansion 238 | title fastscraper ver. %releaseDate% - %dict[23]% 239 | 240 | rem Save finish time 241 | set endTime=%time% 242 | 243 | rem Change formatting for the start and end times 244 | for /F "tokens=1-4 delims=:.," %%a in ("%startTime%") do ( 245 | set /A "start=(((%%a*60)+1%%b %% 100)*60+1%%c %% 100)*100+1%%d %% 100" 246 | ) 247 | 248 | for /F "tokens=1-4 delims=:.," %%a in ("%endTime%") do ( 249 | set /A "end=(((%%a*60)+1%%b %% 100)*60+1%%c %% 100)*100+1%%d %% 100" 250 | ) 251 | 252 | rem Calculate the duration by subtracting values 253 | set /A elapsed=end-start 254 | 255 | rem Correct if the measurement was in between days (8640000 centisec/day) 256 | if %end% lss %start% set /A elapsed=end-start+8640000 257 | 258 | rem Format the results for output 259 | set /A hh=elapsed/(60*60*100), rest=elapsed%%(60*60*100), mm=rest/(60*100), rest%%=60*100, ss=rest/100, cc=rest%%100 260 | if %hh% lss 10 set hh=0%hh% 261 | if %mm% lss 10 set mm=0%mm% 262 | if %ss% lss 10 set ss=0%ss% 263 | if %cc% lss 10 set cc=0%cc% 264 | 265 | set DURATION=%hh%:%mm%:%ss%,%cc% 266 | 267 | echo %dict[19]% : %startTime% 268 | echo %dict[20]% : %endTime% 269 | echo --------------- 270 | echo %dict[21]% : %DURATION% 271 | 272 | popd & pause >nul & exit 273 | 274 | :SUB_folderBrowser 275 | setlocal DisableDelayedExpansion 276 | echo. 277 | echo %dict[9]% 278 | 279 | rem PowerShell-Subroutine to open a Folder Browser 280 | set "psCommand="(New-Object -COM Shell.Application)^ 281 | .BrowseForFolder(0,'%dict[22]%.',0,0).self.path"" 282 | for /F "usebackq delims=" %%i in (`PowerShell %psCommand%`) do set "newRoot=%%i" 283 | 284 | set "romsDir=%newRoot%" 285 | cls & pushd "%romsDir%" & echo %dict[12]% %romsDir% 286 | rem Check if scraping from network drive and show warning about stopping ES 287 | if not x%romsDir:\\=%==x%romsDir% echo %dict[13]% 288 | echo. & goto systemSelection 289 | -------------------------------------------------------------------------------- /fastsorter/Automatic Gamelists Filter.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paradadf/recaltools/6b2f040274052a75dd549dfe40331b9be6794a04/fastsorter/Automatic Gamelists Filter.xlsx -------------------------------------------------------------------------------- /fastsorter/README.md: -------------------------------------------------------------------------------- 1 | Automatic Gamelists Filter 2 | =================== 3 | 4 | Filter **fbalpha 0.2.97.39** and **mame2003** roms by their status. 5 | **bestList** considers duplicates to minimize the gamelist and a prefered core for conflicting roms. 6 | 7 | ---------- 8 | 9 | fastsorter 10 | =================== 11 | 12 | Sort the generated lists to separate folders. 13 | 14 | The source files must have .txt extension. 15 | If you browse for your system, select the root folder where the system folders are placed (not the system itself). 16 | -------------------------------------------------------------------------------- /fastsorter/fastsorter.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | color 3f 3 | set releaseDate=27.01.2017 4 | title fastsorter ver. %releaseDate% 5 | 6 | rem Copy sorted files into destination folder? [Y/N] 7 | set "copyMode=y" 8 | if /I "%copyMode%"=="y" (set appendTitle=[Copy Mode]) else set appendTitle=[Log Mode] 9 | 10 | rem Set prefix for output file (used only if copyMode=n) 11 | set prefixMiss=missing_in_ 12 | 13 | rem Set defaults to launch directory 14 | set rootSource=%~dp0 15 | set rootFolder=%~dp0 16 | 17 | :listSources 18 | title fastsorter ver. %releaseDate% - Source file selection %appendTitle% 19 | rem Show folder names in current directory 20 | echo Available sources for sorting: 21 | for /F "delims=: tokens=1*" %%a in ('dir /B /A-D *.txt^| findstr /N "^"') do ( 22 | set "mapArray[%%a]=%%b" 23 | set "count=%%a" 24 | echo %%a: %%b 25 | ) 26 | 27 | :checkSources 28 | set type=source 29 | setlocal EnableDelayedExpansion 30 | if not exist !mapArray[1]! cls & echo No source file (.txt) found on current directory! & goto SUB_folderBrowser 31 | if %count% gtr 1 set /A browser=%count%+1 & echo.!browser!: Open Folder Browser? & goto whichSource 32 | if %count% equ 1 echo. & set /P "oneSource=Use !mapArray[1]! as source? [Y/N]: " 33 | if /I "%oneSource%"=="y" (set "sourceFile=1" & echo. & goto listFolders) else goto SUB_folderBrowser 34 | 35 | :whichSource 36 | echo. 37 | rem Select source file (.txt) 38 | echo Which one is the source file you want to use? Choose %browser% to change directory. 39 | set /P "sourceFile=#: " 40 | if %sourceFile% equ %browser% goto SUB_folderBrowser 41 | setlocal EnableDelayedExpansion 42 | if exist !mapArray[%sourceFile%]! echo. & goto listFolders 43 | echo Incorrect input^^! & goto whichSource 44 | 45 | :listFolders 46 | setlocal DisableDelayedExpansion 47 | title fastsorter ver. %releaseDate% - System folder selection %appendTitle% 48 | rem Show folder names in current directory 49 | cd %~dp0 50 | set count=0 51 | echo Available folders for sorting: 52 | for /F "delims=: tokens=1*" %%a in ('dir /B /A:D ^| findstr /N "."') do ( 53 | set "mapArray2[%%a]=%%b" 54 | set "count=%%a" 55 | echo %%a: %%b 56 | ) 57 | 58 | :checkFolders 59 | set type=root 60 | setlocal EnableDelayedExpansion 61 | if not exist !mapArray2[1]! cls & echo No folders found on current directory! & goto SUB_folderBrowser 62 | if %count% gtr 1 set /A browser=%count%+1 & echo.!browser!: Open Folder Browser? & goto whichSystem 63 | if %count% equ 1 echo. & set /P "oneFolder=Use !mapArray2[1]! as target? [Y/N]: " 64 | if /I "%oneFolder%"=="y" (set "whichSystem=1" & goto whichFolder) else goto SUB_folderBrowser 65 | 66 | :whichSystem 67 | echo. 68 | rem Select system folder 69 | echo Which system do you want to sort? Choose %browser% to change directory. 70 | set /P "whichSystem=#: " 71 | if %whichSystem% equ %browser% goto SUB_folderBrowser 72 | setlocal EnableDelayedExpansion 73 | if exist !mapArray2[%whichSystem%]! echo. & goto createFolder 74 | echo Incorrect input^^! & goto whichSystem 75 | 76 | :createFolder 77 | rem Create destination folder 78 | if /I not "%copyMode%"=="y" goto sortFiles 79 | set destFolder=!mapArray[%sourceFile%]:~0,-4! 80 | if not exist ".\!mapArray2[%whichSystem%]!\!destFolder!" md ".\!mapArray2[%whichSystem%]!\!destFolder!" 81 | 82 | :sortFiles 83 | rem Look inside the source file and copy the files to the destination folder 84 | title fastsorter ver. %releaseDate% - Sorting files in progress... %appendTitle% 85 | set system=!mapArray2[%whichSystem%]! 86 | for /F "delims=" %%a in ('type "%rootSource%\!mapArray[%sourceFile%]!"') do ( 87 | setlocal DisableDelayedExpansion 88 | if exist ".\%system%\%%a" ( 89 | if /I "%copyMode%"=="y" robocopy ".\%system%" ".\%system%\%destFolder%" "%%a" >nul 90 | echo %%a 91 | ) else ( 92 | if "%%~xa"=="" ( 93 | rem Not a file 94 | ) else ( 95 | echo. 96 | echo %%a missing & echo. 97 | if /I not "%copyMode%"=="y" echo %%a >> "%~dp0%prefixMiss%%system%.txt" 98 | ) 99 | ) 100 | endlocal 101 | ) 102 | 103 | title fastsorter ver. %releaseDate% - Sorting files finished^^! %appendTitle% 104 | 105 | popd & pause >nul & exit 106 | 107 | :SUB_folderBrowser 108 | setlocal DisableDelayedExpansion 109 | if %count% lss 1 set /P "openBrowser=Open Folder Browser? [Y/N]: " 110 | if %count% lss 1 ( 111 | if not "%openBrowser%"=="y" exit 112 | ) 113 | set count=0 & echo Opening Folder Browser... & echo. 114 | if "%type%"=="root" echo Select the root system folder, not the system itself! 115 | 116 | rem PowerShell-Subroutine to open a Folder Browser 117 | set "psCommand="(new-object -COM 'Shell.Application')^ 118 | .BrowseForFolder(0,'Please choose a %type% folder.',0,0).self.path"" 119 | for /f "usebackq delims=" %%i in (`powershell %psCommand%`) do set "newRoot=%%i" 120 | 121 | if "%type%"=="source" set rootSource=%newRoot% 122 | if "%type%"=="root" set rootFolder=%newRoot% 123 | 124 | rem Change working directory 125 | if "%type%"=="source" cls & pushd %rootSource% & goto listSources 126 | if "%type%"=="root" cls & pushd %rootFolder% & setlocal EnableDelayedExpansion & echo Selected source file: !mapArray[%sourceFile%]! & echo. & goto listFolders 127 | -------------------------------------------------------------------------------- /fastunmount/README.md: -------------------------------------------------------------------------------- 1 | # fastunmount 2 | 3 | Disconnect mounted network drives easily. -------------------------------------------------------------------------------- /fastunmount/fastunmount.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | color 3f 3 | set releaseDate=12.01.2017 4 | title fastunmount ver. %releaseDate% 5 | 6 | rem List all mapped network drives 7 | net use 8 | 9 | rem Disconnect selected network drives 10 | echo Which drive(s) do you want to unmount? All? (Ex. "z") 11 | set /p whichDrives= 12 | if /i not "%whichDrives%"=="all" echo. & goto selectedDrives 13 | 14 | echo. 15 | 16 | for /F "tokens=1,2,3" %%a in ('net use^| find "\\"') do ( 17 | echo.Unmounting %%c from drive letter %%b 18 | net use %%b /D 19 | ) 20 | 21 | :selectedDrives 22 | rem Show warning for incorrect inputs 23 | for %%a in (%whichDrives:all=%) do ( 24 | if not exist %%a: echo %%a: not found! 25 | ) 26 | echo. 27 | 28 | for /F "tokens=1,2,3" %%a in ('net use^| find "\\"') do ( 29 | for %%d in (%whichDrives%) do ( 30 | if /I "%%d:"=="%%b" ( 31 | echo.Unmounting %%c from drive letter %%b 32 | net use %%b /D 33 | ) 34 | ) 35 | ) 36 | 37 | title fastunmount ver. %releaseDate% - Unmounting finished! 38 | pause >nul 39 | --------------------------------------------------------------------------------