Automating copying from CDROM to HDD

Today I decided to back up my CDs. I already have them backed up as MP3s burned to CD-Rs, but I finally have time to put them on my server…

Some of these discs are old and the drives are unable to read the files (yes, I’ve been buying music for a while now) So in windows when it was trying to copy a file over it would open a window and ask what to do. This is not good as it kept interrupting my other work. So I go to BSD to solve my problem.

1) I had to make sure that I can see what’s going on. So the copying had to be verbose.

2) I didn’t want to have to do a whole lot. The least amount of interaction possible is desired.

So I ended up making a script that:

  • Closes the drive tray
  • Mounts the cd drive
  • Copies all the desired files to a specified directory
  • Umounts the cd drive
  • Ejects the drive tray

I’ll put the code and script on the forum for review & download.

So far I’m 1/2 way done and haven’t had a problem.

Sometimes BSD is just that great!

As to the reason I want them on my server… I am learning to program Android applications so I can stream my music to my phone via inet (since it’s a 4G Evo). It’ll take a while, but as always, I am sure I can do it.

Leave a Reply

You must be logged in to post a comment.