CCD to CUE Batch Conversion (Windows)

Sumolx
Posts: 24
Joined: Sun Jun 07, 2020 1:50 am
Been thanked: 7 times

CCD to CUE Batch Conversion (Windows)

Unread post by Sumolx »

Perhaps people will find this script useful, I created this script to perform the conversion from CCD/SUB/IMG to CUE/BIN in an automated fashion for the MegaCD. Figured I would share it and maybe it is compatible with other console platforms too...

Required Tools:
ImgBurn
Virtual CloneCD

Instructions:
1. Create file called ccd2cue.bat
2. Paste the code block below into the file ccd2cue.bat
3. ccd2cue.bat requires a folder called "ccd" with all your images within it.
4. Executing ccd2cue.bat will create a output path called "cue" to store the converted images.
5. My cd_drive is "d:", you may have to change it for your system.
6. Good Luck!!!

Code: Select all

@ECHO off

ECHO "##########################################################################"
ECHO "## Simple utility for batch conversions of CCD to CUE Images.           ##"
ECHO "##                                                                      ##"
ECHO "## Requires: ImgBurn (http://imgburn.com)                               ##"
ECHO "## Requires: Virtual CloneDrive (https://www.elby.ch/products/vcd.html) ##"
ECHO "##                                                                      ##"
ECHO "## Directory Structure:                                                 ##"
ECHO "##                      /ccd2cue.bat       <-- This file                ##"
ECHO "##                      /ccd/              <-- Source Directory         ##"
ECHO "##                      /ccd/file.ccd                                   ##"
ECHO "##                      /ccd/file.sub                                   ##"
ECHO "##                      /ccd/file.img                                   ##"
ECHO "##                      /cue/              <-- Target Directory         ##"
ECHO "##                      /cue/file.cue                                   ##"
ECHO "##                      /cue/file.bin                                   ##"
ECHO "##                                                                      ##"
ECHO "## This batch file is Public Domain do as you will.                     ##"
ECHO "##########################################################################"
ECHO 

REM Variables

SET imgburn="C:\Program Files (x86)\ImgBurn\imgburn.exe"
SET loadccd="explorer"
SET src_path=ccd
SET dst_path=test
SET cd_drive=d:

REM Execution

IF NOT EXIST %dst_path% (
    MKDIR %dst_path%
)

FOR %%i IN ("%CD%\%src_path%\*.ccd") do (
    ECHO "%%i"

    %loadccd% "%%i"

    REM Allow sometime for virtual drive to load CCD
    timeout /t 5
    
    %imgburn% /mode read /src %cd_drive% /dest "%CD%\%dst_path%\%%~ni.bin" /start /eject /close
)
Post Reply