3.5 Files

MS-DOS gives programs access to files in the file system. Programs can read from and write to existing files, as well as create new ones.

Files can contain any amount of data, up to the limits of the storage medium. (Since MS-DOS stores the size of a file as a 31-bit number, the theoretical maximum for file size is 2 gigabytes.) MS-DOS stores a file's data in the order the program writes the data, so the meaning and format of the data are entirely up to the program.

Apart from its contents, every file has a name (possibly with an extension), access attributes, and an associated date and time. This information is stored in the file's directory entry, not in the file itself.