Batch File with Parentheses Cannot Be Started (217127)
The information in this article applies to:
- Microsoft Windows 2000 Server
- Microsoft Windows 2000 Advanced Server
- Microsoft Windows 2000 Professional
- Microsoft Windows NT Server 4.0
- Microsoft Windows NT Workstation 4.0
This article was previously published under Q217127 SYMPTOMS
When you attempt to start a batch file from the desktop, it fails without an error message.
CAUSE
The batch file has parentheses in its file name. Parentheses are allowed characters in filenames, but, if you use this for a batch file, the parentheses are parsed as command-line syntax. For additional information, click Start, click Help, click Windows NT Commands, and then click What's New or Different from MS-DOS. There you will find parentheses as a command for "Groups commands."
RESOLUTION
To work around this problem, run the batch file from a command shell and use quotation marks to encapsulate the name.
Output when no quotation marks are used:
D:\>Copy (2) of Example.bat
The system cannot find the file specified.
Output when quotation marks are used:
D:\>"Copy (2) of Example.bat"
D:\>pause
Press any key to continue . . .
Modification Type: | Major | Last Reviewed: | 5/14/2003 |
---|
Keywords: | kbprb KB217127 |
---|
|