Microsoft KB Archive/43082

MS-DOS Redirection Temporary Files PSS ID Number: Q43082 Article last modified on 02-10-1993 PSS database name: O_MSDOS

3.x 4.00 4.01

MS-DOS

Question:

When I execute the command “DIR | MORE” in the root directory from the MS-DOS command prompt, I notice two files, of length zero, with hexadecimal filenames and no extension. The filenames are similar to the following:

133A244A 133A2450

What is the purpose of these files, and why don’t they appear when I just execute the DIR command?

Response:

The files you see are created internally by MS-DOS when you use I/O redirection. The filenames are created by using the values of the date and time to create a random filename for redirection process.

Specifically, you are using a type of redirection called a pipe. This redirection facility is used to pass information from one program to another. A pipe in MS-DOS is a special file created by COMMAND.COM. COMMAND.COM redirects the output of one program into this file and then redirects this file as the input to the next program, in this case, the MORE command.

The technique of pipes was adapted from UNIX/XENIX. The technique was adapted for a single-process operating system by using temporary files, rather than memory buffers, to transfer information from one program to another.

For more information on I/O redirection refer to “The MS-DOS Encyclopedia,” Article 2, I/O redirection, Pages 67-68.

Additional reference words: 3.x 4.00 4.01 noupd

Copyright Microsoft Corporation 1993.