Rename and move all files stored in CD1, CD2, CDx subfolders to ../x-filename
Run this from the parent folder you're looking to process:
find . -type d -iname "CD?" -exec ~/renameandmove.sh "{}" \;
Contents of renameandmove.sh (save in your home folder and chmod +x renameandmove.sh)...