Imagine a laptop that's been infected by malware, and that the owner hasn't backed-up their files.* They have pictures, videos, and documents they'd like to preserve, so they're hesitant to immediately nuke it from orbit.
The objective is to back-up the files they wish to keep before wiping their machine, but how can they know that one of their files isn't infected? A common suggestion I've seen here is scanning said files after moving them to an external hard drive, for example, and then moving them back to the machine which has just been wiped. In this case, the concern is the malware evades detection and restoration reinfects their computer.
How can the user safely back-up files from an infected machine so that they avoid reinfection when transferring them to a clean machine?
*By "files," I mean documents, images, video, programming projects, etc.; not system files, like registry settings and scripts.