Original post by: Dan ,
Your iMac is missing the system software which is why the folder with a blinking question mark is showing up. Your system might have the ability to do Internet recovery. How about giving it a try! Press either the '''Option -Command - R''' or '''Shift - Option - Command - R''' keys to start up from macOS Recovery over the Internet. [https://support.apple.com/en-us/HT201255|Mac startup key combinations] If that fails you’ll need to create a bootable USB drive or get a SATA to USB adapter so your old drive can be connected to your system.