# Create .CUE From .CHD Files

## Windows

[chd2cue.bat](https://wikipedia.mutschlerhome.com/attachments/220)

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

## Linux

[convertFromChdToCue.sh](https://wikipedia.mutschlerhome.com/attachments/224)

```bash
#!/bin/bash

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

```