This post explains how to extract the list of attachments attached to a record.
Unfortunately, from the file names you cannot understand to which records each file is linked to. In order to do this you have to run an SQL query. In this example I'm showing how to get all the file names of work orders attachments.