Some CD drives come with software that allow you to use the CD directly from Explorer like a big floppy as opposed to using CD burning software. Is this what you have?
My guess is that the problem is in the file system format being used. CDs don't use the same type of file systems that hard disks (and flash drives) use. The file systems are Joliet, Romeo, and ISO-something. I don't remember the exact details (you can Google for it), but there are limitations on filename lengths, and total filepath lengths. Your best bet is to zip up the code and then write it to CD.
Another possibility: If you have a folder that has pictures in it, Windows Explorer will create a "Thumbs.db" file if you view the folder in Thumbnail view. This file can't usually be copied to CD. At least, I've had problems with it.