Batch File with Parentheses Cannot Be StartedID: Q217127
|
When you attempt to start a batch file from the desktop, it fails without an error message.
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."
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.batOutput when quotation marks are used:
The system cannot find the file specified.
D:\>"Copy (2) of Example.bat"
D:\>pause
Press any key to continue . . .
Additional query words:
Keywords :
Version : winnt:4.0
Platform : winnt
Issue type : kbprb
Last Reviewed: February 16, 1999