Afin de donner aux bars le CD may work only for literary purpose, poetry for example.
The correct and common way to say it is afin de donner le CD aux bars.
In French, the direct object generally (always?) shows before the indirect one: in je donne le CD aux bars as well as in je le leur donne.