By default, MS-DOS imposes a system-wide limit of 8 on the number of file handles available for all programs. This means that current programs (whether running or suspended) can have no more than eight open files among them. MS-DOS automatically uses 5 handles when it opens the five standard devices (AUX, COM, LPT, CON, PRN). Since the standard devices always remain open, the number of available file handles is always 5 less than the system limit. If more handles are needed, the user can set a new limit (up to 255 handles) by using the files command in the CONFIG.SYS file.
MS-DOS also imposes a limit of 20 on the number of file handles available for individual programs. Since most programs inherit copies of the standard-device handles, the number of available handles is always 5 less than the program limit. If more handles are needed, a program can increase its own limit by using Set Maximum Handle Count (Interrupt 21h Function 67h), but it cannot acquire handles in excess of the current system-wide limit. Alternatively, the program can close one or more of the standard devices and free the handles for other files.
A program can open the same file more than once, receiving a unique handle each time. The program can use any of the handles to access the file. For file management, some of the information maintained by the system for each handle is shared by all handles. For example, no matter how many handles exist for a given file, the file never has more than one file pointer. This means a program cannot access different parts of the file at the same time, because moving the file pointer by using one handle also moves it for all other handles.