Microsoft KB Archive/83895

= Files Left Open Using CALL Command on .EXE File =

Article ID: 83895

Article Last Modified on 5/12/2003

-

APPLIES TO


 * Microsoft MS-DOS 5.0 Standard Edition
 * Microsoft MS-DOS 5.0a
 * Microsoft MS-DOS 6.0 Standard Edition
 * Microsoft MS-DOS 6.2 Standard Edition
 * Microsoft MS-DOS 6.21 Standard Edition
 * Microsoft MS-DOS 6.22 Standard Edition

-



This article was previously published under Q83895



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 &quot;Microsoft MS-DOS User's Guide and Reference&quot; 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:

  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  Execute Manifest MFT.EXE and check number of files open under the DOS section. Run TEST.BAT. 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: KB83895

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.