CD/DVD to HDD copy batch program

vbimport

#1

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!


#2

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


#3

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]

[ol]
[li]CLEWD - http://shounen.ru/soft/clewd/
[/li][li]RoboCopy - included with Windows Vista (use XCOPY32 with modified parameters if using Windows XP)
[/li][/ol]

[B]Usage:[/B]

[LIST=3]
[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).
[/li][/LIST]

[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
:nodisc
echo.
echo No disc is currently loaded. Trying to eject tray...
goto loaddisc
:copystart
echo.
cd /d %~dp0
for /F "tokens=6,*" %%i in ('vol [B]E:[/B]') do set dsclbl=%%i %%j
if exist "%dsclbl%" (
echo.
echo THIS FOLDER ALREADY EXISTS. PRESS CTRL+C TO ABORT...
pause>nul
) 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.
echo Finished copying. Ejecting disc...
:loaddisc
clewd -e [B]E:[/B]
echo.
title Insert next disc to continue...
clewd -w [B]E:[/B]
if errorlevel 1 goto copystop
goto copystart
:copystop
echo.
echo No disc inserted. Aborting %~nx0 execution.
title "CopyDiscGO script stopped."
pause

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

[ul]
[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)
[/li][/ul]

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:


#4

phaelox,

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

RM