The need is to compile a list of fileIDs of 2 types of Salesforce files that contain a specific word within them.
- Document Files in ContentVersion
- Email Attachment files in Attachment
When using global search to search in FILES, an elegant list of matching files are returned (but without the file ID )
The goal is exclude these files/delete them prior to migrating to a new org.
It seems that the only option is to do 2 passes: Use Data Loader to search ContentVersion object, download the file using curl and then check if the word is present
Rinse and Repeat for Attachment object.
Is there a more elegant solution to somehow get to the file ID of these files so we can exclude them easily?