Recalbox Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • recalbox.com
    • Gitlab repository
    • Documentation
    • Discord

    [How-To] Portable *.bat to batch convert multiple BIN images to single BIN/CUE (PSX/PS1)

    Emulator Arcade/PC/Console
    how-to multi-bin single-bin psx chdman
    1
    1
    1718
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • messiahgov
      messiahgov last edited by

      I hope it's OK to post this here. After noticing the script from VajskiDs here: https://github.com/L10N37/Batch-Convert-multi-BIN-to-single-BIN I managed to optimize it a bit to make it portable, basically no need to edit any paths anymore.

      The Convert_MultiBIN2Single.bat (The code may look different here, as it should be in NP++ as an example.)

      @REM Portable Multi-BIN to Single-BIN Batch Script v2.0 by m3Zz
      @ECHO off
      CLS
      SET chdmanpath="%~dp0chdman.exe"
      SET sourcepath="%~dp0\MultiBIN"
      SET workpath="%~dp0\_TEMP"
      SET destpath="%~dp0\SingleBIN"
      FOR /R "%sourcepath%" %%R IN (*.cue) DO ( 
      %chdmanpath% createcd -i "%%R" -o "%workpath%\%%~nR.chd" -f 
      %chdmanpath% extractcd -i "%workpath%\%%~nR.chd" -o "%destpath%\%%~nR.cue" -ob "%destpath%\%%~nR.bin" -f
      DEL "%workpath%\%%~nR.chd"
      )
      EXIT
      

      You still need the "chdman.exe" (I used the latest v0.239) at the same place as the *.bat. It can be extracted with 7-Zip from the downloaded "mame0239b_64bit.exe" here: https://www.mamedev.org/release.php

      So, create the *.bat anywhere you like with the code above, place the chdman.exe next to it and also create the folders "MultiBIN", "_TEMP" and "SingleBIN" at the same place. All in one folder. Now simply place all your multiple BIN games (PSX/PS1 incl. tracks) you want to convert into the "MultiBIN" folder and run the script. It will convert them first to CHD and single BINs with CUE.

      This "%~dp0" defines the path from where the *.bat was started, which makes the whole thing portable. I also added a "chdmanpath", to get an useable value for that if needed. All those can be changed to your liking, but right now there's no need for a full path to anything. Between the brackets is the loop.

      All unnecessary lines are removed (REM, etc.) from the original script. For me, there is no need for any further description, the script now works out of the box and basically explains itself. No need for multiple chdman.exe's any more (before it needed to be in the temp and sourcepath). I packed myself a Zip with the "Convert_MultiBIN2Single.bat" + chdman.exe + the empty folders and can extract the anywhere for instant use.

      So, I hope it helps , because it took some time to change it. Important seems to be, that the folder structure, equal if you use a portable path or full path, has no spaces. My 1st problem was a single space in one folder name, like this "G:\E_STUFF\EMU_TOOLS\02 ISO-Image\MultiBIN2Single". After changing it to "..\02_ISO-Image.." it worked like a charm.

      If needed, I uploaded the package (bat + exe + empty folder) to Zippy and Uptobox, and also some mirrors:

      https://www54.zippyshare.com/v/XK9l6qkN/file.html
      https://uptobox.com/69lt2m57oboy
      https://mirrorace.org/m/3Mr7u
      https://multiup.org/download/6a909d543fbe8a69b5f8487d67641003/MultiBIN2Single%20v2.0%20by%20m3Zz%20%28for%20PSX%20BINs%29.7z
      https://www.mirrored.to/files/1DK1MTHV/MultiBIN2Single_v2.0_by_m3Zz_(for_PSX_BINs)_0.7z_links
      

      Greetings!

      1 Reply Last reply Reply Quote 0
      • First post
        Last post

      Want to support us ?

      87
      Online

      99.6k
      Users

      28.1k
      Topics

      187.1k
      Posts

      Copyright © 2021 recalbox.com