@Slava Savitsky Hi can you provide sample script regarding fetching those details to custom table.
To delete the attachments i have post import script in scheduled import.

var attachmentRec = new GlideRecord('sys_attachment');
attachmentRec.addQuery('table_sys_id', '0dbd1dcd97f6ce10c37bba86f053af9e');
attachmentRec.query();
if (attachmentRec.next()) {
    attachmentRec.deleteRecord();
}