The delete button passes the ID of the record to delete using a form variable:
WADADeleteRecordID
Create a new recordset that is configured to filer the ID column using the WADADeleteRecordID form variable. In the delete file server behavior, use the file name column from the new recordset that you create to delete the corresponding file for the record that is being deleted.