DOCUMENT:Q83895 17-DEC-2000 [msdos] TITLE :Files Left Open Using CALL Command on .EXE File 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 ------------------------------------------------------------------------------- SYMPTOMS ======== If you use the CALL command in a batch file to execute an .EXE file and use appending redirection (>>) to save the output to a report file, files remain open for the number of times the redirection is used. WORKAROUND ========== Remove the CALL command from the batch file. The CALL command should only be used in batch files as described on page 377 of the "Microsoft MS-DOS User's Guide and Reference" for version 5.0, and MS-DOS online help for versions 6.0 and 6.2. MORE INFORMATION ================ The above has been verified using Quarterdeck Manifest version 1.1. The following example batch file and steps demonstrate the problem: 1. Create a TEST.BAT file (substitute your Quarterdeck directory for C:\QDECK): ECHO **MANIFEST REPORT FILE** > C:\QDECK\REPORT.DAT CALL C:\QDECK\MFT S O >> C:\QDECK\REPORT.DAT CALL C:\QDECK\MFT S C >> C:\QDECK\REPORT.DAT ECHO **END OF REPORT FILE** >> C:\QDECK\REPORT.DAT 2. Execute Manifest MFT.EXE and check number of files open under the DOS section. 3. Run TEST.BAT. 4. Execute Manifest MFT.EXE and check number of files left open after the batch file has run. There should be two more files left open (both REPORT.DAT) in step 4 than were in step 2. Adding more (CALL C:\QDECK\MFT >>) to the batch file or running the TEST.BAT file again will cause more files to be left open. To close the open file handles, you will have to restart your system. Additional query words: 6.22 msdos 5.00 5.00a 6.00 6.20 files open mft sharing violation call ====================================================================== 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.