What kind of files can spread viruses?

Viruses have the potential to infect any type of executable code, not just the files that are commonly called ‘program files’. For example, some viruses infect executable code in the boot sector of floppy disks or in system areas of hard drives. Another type of virus, known as a ‘macro’virus, can infect word processing and spreadsheet documents that use macros. And it’s possible for HTML documents containing JavaScript or other types of executable code to spread viruses or other malicious code.

Since virus code must be executed to have any effect, files that the computer treats as pure data are safe. This includes graphics and soundfiles such as .gif, .jpg, .mp3, .wav, etc., as well as plain text in .txt files. For example, just viewing picture files won’t infect your computerwith a virus. The virus code has to be in a form, such as an .exe program file or a Word .doc file, that the computer will actually try to execute.