Text fileA text file (sometimes spelled textfile; an old alternative name is flatfile) is a kind of that is structured as a sequence of of electronic text. A text file exists stored as data within a . In operating systems such as CP/M and MS-DOS, where the operating system does not keep track of the file size in bytes, the end of a text file is denoted by placing one or more special characters, known as an (EOF) marker, as padding after the last line in a text file.