Choose what your Mac does when you insert a CD or DVD
If your Mac has a built-in or external optical drive, you can choose what your Mac does when you insert certain types of CDs and DVDs. For example, you can open Photos whenever you insert a picture CD, or run an AppleScript script that backs up your important documents whenever you insert a blank DVD.
On your Mac, choose Apple menu > System Preferences, then click CDs & DVDs. (If you don’t have an optical drive built into or connected to your Mac, CDs & DVDs preferences aren’t available.)
Use the pop-up menus to choose an action for the type of inserted disc.
Some apps can start processing an inserted disc immediately. For example, iTunes can immediately import songs from a music CD, and DVD Player can immediately play a video. To find out how to set up an app to start processing a disc immediately, see the app’s help.