File viruses infect executable files by inserting their code into some part of the original file so that the malicious code can be executed when the file is accessed. An overwriting file virus is one that overwrites the original file entirely, replacing it with the malicious code. File infecting viruses have targeted a range of operating system, including Macintosh, UNIX, DOS, and Windows.
Overwriting viruses cause irreversable damage to the files. Loveletter, which operated as an email worm, file virus, and Trojan downloader, is a notorious example of a file overwriting virus. Loveletter searched for certain file types and overwrote them with its own malicious code, permanently destroying the contents of those files. Files affected by an overwriting virus cannot be disinfected and instead must be deleted and restored from backup.