DOCUMENT:Q74464 17-DEC-2000 [msdos] TITLE :Pipe (|) After IF EXIST Fails PRODUCT :Microsoft Disk Operating System PROD/VER:MS-DOS:5.x,6.0,6.2,6.21,6.22 OPER/SYS: KEYWORDS: ====================================================================== ------------------------------------------------------------------------------- The information in this article applies to: - Microsoft MS-DOS operating system versions 5.0, 5.0a, 6.0, 6.2, 6.21, 6.22 ------------------------------------------------------------------------------- SUMMARY ======= There is a known problem with the pipe (|) command that causes the pipe to fail when used after an IF EXIST statement. For example, the command IF EXIST c:\dos\readme.txt TYPE c:\dos\readme.txt | MORE normally displays the contents of C:\DOS\README.TXT one screen at a time. When this command is issued under MS-DOS 5.0, 6.0, or 6.2 no information is displayed and you are returned to the prompt, even though the file exists. In addition, this command results in File Allocation Table (FAT) corruption on the drive that the TEMP environment variable is pointing to or on the current drive if no TEMP variable has been set. Running CHKDSK after this command shows there are " lost clusters in 1 chain," where is dependent upon the size of the file being processed by the pipe. (The number of lost clusters and chains might be larger if there was additional FAT corruption prior to using the pipe.) The FAT corruption caused by this command does not result in data loss, and you can use CHKDSK with the /F switch to correct the corruption. Please refer to the "Microsoft MS-DOS User's Guide and Reference" for more information on the use of the CHKDSK command. Microsoft has confirmed this to be a problem in MS-DOS versions 5.00, 5.00a, 6.00, 6.20, 6.21, and 6.22. We are researching this problem and will post new information here as it becomes available. Additional query words: 6.22 5.00 5.00a 6.00 6.20 batch ====================================================================== Keywords : Technology : kbMSDOSSearch kbMSDOS621 kbMSDOS622 kbMSDOS620 kbMSDOS600 kbMSDOS500 kbMSDOS500a Version : MS-DOS:5.x,6.0,6.2,6.21,6.22 ============================================================================= THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY. Copyright Microsoft Corporation 2000.