CD/DVD to HDD copy batch program



I bought a 750 GB external HDD drive, because I want to copy all those CD and DVDs I have around - some of them are quite old (1999 -) and I fear losing data.

Now I have to insert every CD/DVD into drive, select all files, make a folder on HDD and copy it… Very boring job, since I have more than 600 CDs to copy :rolleyes:

Long story short - is there a batch program to do all this, so I just insert CD/DVD and the program automatically makes a folder (out of label or periodically), starts copying onto HDD and in the end ejects the tray? :confused:

Thanks in advance!


did you find any batch file or program to copy CD/DVD to hard drive?
i want to do the same thing…


I found this thread via google, because I was looking for the exact same thing. I couldn’t find it, so I wrote my own batch file, making use of a few 3rd party tools. It will wait for a disc to be inserted, and copy the disc contents into a new folder in the current folder with the disc label as its name, then eject the disc and wait for a new disc to be inserted. This will repeat ad infineam, or until interrupted, or until empty tray is closed.

[B]Tools required:[/B]

[li]CLEWD -
[/li][li]RoboCopy - included with Windows Vista (use XCOPY32 with modified parameters if using Windows XP)


[li]Copy/paste script below to Notepad and change the red/bold driveletter [B]E:[/B] to your CD/DVD-ROM driveletter.
[/li][li]Save as CopyDiscGO.cmd in the folder you wish to batch-copy the contents of your discs to.
[/li][li]Download CLEWD and save to same folder or your WINDOWS folder (or another folder in your %PATH% environment variable).

[B]Contents of batch file CopyDiscGO.CMD:[/B]

@echo off
title Checking disc in [B]E:[/B]...
echo Checking disc in [B]E:[/B]...
clewd -t [B]E:[/B]
if errorlevel 1 goto nodisc
goto copystart
echo No disc is currently loaded. Trying to eject tray...
goto loaddisc
cd /d %~dp0
for /F "tokens=6,*" %%i in ('vol [B]E:[/B]') do set dsclbl=%%i %%j
if exist "%dsclbl%" (
) else md "%dsclbl%"
cd "%dsclbl%"
title Copying %dsclbl% to disk %~d0
echo Copying disc "%dsclbl%" to hard disk...
robocopy [B]E:[/B]\ . /copy:DT /A-:RSH /R:1 /W:20 /NJH /E
title %dsclbl% finished copying. Ejecting disc...
echo Finished copying. Ejecting disc...
clewd -e [B]E:[/B]
title Insert next disc to continue...
clewd -w [B]E:[/B]
if errorlevel 1 goto copystop
goto copystart
echo No disc inserted. Aborting %~nx0 execution.
title "CopyDiscGO script stopped."

[B]The RoboCopy switches explained:[/B]

[li]E:\ - source
[/li][li]/copy:DT - copy file (D)ata and (T)imestamps
[/li][li]/A-:RSH - remove attributes ®eadonly/(S)ystem/(H)idden
[/li][li]/R:1 - retry copy operation 1 time if copy fails
[/li][li]/W:20 - wait 20 seconds before retrying
[/li][li]/NJH - no job header
[/li][li]/E - copy subdirectories including empty ones (use /S instead to skip empty dirs)

Feel free to modify/redistribute all you wish. This script comes with absolutely no guarantees, although it works fine for me (Vista Ultimate x64 SP1).

Hope this helps some people. If you like it, leave a message. :slight_smile:



Thanks for the great contribution to the forum. I hope this procedure gets stickied somewhere so it doesn’t get lost.