The code itself must be integrated in an EA Extension. This is not included here. To use the code you have to instantiate the class RefImage with open Repository and an OleDB connection string to the open repository. After initiation of the class you can use the method create to create a file in EA Reference File format to import the images completely via standard import of EA or you can use write to import each image directly in the EA database tables. For both methods the recursive option scans the selected folder and all subfolders.
Feel free to change the code. At the moment it is hardcoded that only "*.emf" files are scanned so also Metafile as Type is hardcoded. Some parts can be removed also if you do not want to import images directly in the database.