This script will allow you process a directory full of subdirectories with your uncompressed cue
, gdi
, iso
, etc files and output the compressed chd
in the same directory.
find . -name '*.cue' -print0 | while IFS='' read -r -d '' file; do
exfile="$(echo $file | sed -E 's/\.[A-z]+$//')"
chdman createcd -i "${file}" -o "${exfile}.chd";
done