Collections:
Other Resources:
Quotation without the Closing Mark
What will happen if a quotation is missing the closing mark in a batch parameter? I entered 3 quotation marks (double quotes) in the command line.
✍: FYIcenter.com
If a quotation is missing the closing mark in a batch parameter, that parameter will be extended to the end of the line.
Quotations have higher precedence than redirection operators (< and >) and command joining operators (& and |).
So if you have 1, 3, 5, or any odd numbers of double quotes in a command, the last double quote will open a quotation that reaches the end of line.
Count the number of double quotes in a line to make sure it's an even number.
Here are some examples on using quotations without the closing marks:
C:\fyicenter>Parameter-Cleaned.bat \Pro"gram Fi"les\Microsoft" Office (Parameter-Cleaned.bat) (\Pro"gram Fi"les\Microsoft" Office) () () () () (\Pro"gram Fi"les\Microsoft" Office) (\Program Files\Microsoft Office) C:\fyicenter>Parameter-Cleaned.bat \Pro"gram Fi"les\Microsoft" Office > nul (Parameter-Cleaned.bat) (\Pro"gram Fi"les\Microsoft" Office > nul) () () () () (\Pro"gram Fi"les\Microsoft" Office > nul) (\Program Files\Microsoft Office ) C:\fyicenter>Parameter-Cleaned.bat \Pro"gram Fi"les\Microsoft" Office & echo Hi (Parameter-Cleaned.bat) (\Pro"gram Fi"les\Microsoft" Office & echo Hi) () () () () (\Pro"gram Fi"les\Microsoft" Office & echo Hi) Hi (\Program Files\Microsoft Office )
Notice that remove quotation mark code did not work correctly with redirection operations and command joining operators.
⇒ Escape Double Quote in Batch Parameter
⇐ Multiple Quotations in a Single Parameter
2021-07-02, 2354🔥, 1💬
Popular Posts:
How to add a hyperlink to connect a keyword to another slide? I want to have clickable links to help...
What is ZCfgSvc.exe process - Intel Wireless ZeroCfgSvc MFC Application? Process ZCfgSvc.exe is the ...
How to burn or record MP3 music files as audio tacks to audio CD (Compact Disk Digital Audio or CD-D...
What is "Cryptographic Services" in my Windows XP service list? And how is "Cryptographic Services" ...
Where to find tutorials on using Windows Server 2012? I want to learn how to use Windows Server 2012...