# Create .CHD From .CUE Files

## Windows

[cue2chd.bat](https://wikipedia.mutschlerhome.com/attachments/218)

```bash
for /r %%i in (*.cue) do chdman createcd -i "%%i" -o "%%~ni.chd" >> log
```

## Linux

[convertFromCueToChd.sh](https://wikipedia.mutschlerhome.com/attachments/222)

```bash
parallel chdman createcd -i {} -o {.}.chd ::: *.cue
```

<p class="callout danger">The below script and the attached version above does not work. Need to test and change accordingly.</p>

```bash
#!/bin/bash

# Grab .cue file
for f in ./**/*.cue
do
	name=${f%.cue} # Remove '.cue' from file name
	chdman createcd -i "$name.cue" -o "$name.chd" --force
done

```