Categories:
Administration (10)
Adware Spyware (7)
Apache (10)
Bluetooth (125)
DOS Commands (1)
Edge (28)
General (2)
Internet Explorer (217)
Media Center (12)
Media Player (11)
Mozilla Firefox (18)
PHP (15)
Programming (8)
Security (4)
Silverlight (15)
Tips (17)
Tools (218)
Tutorials (5)
Windows 10 (166)
Windows 7 (636)
Windows 8 (1091)
Windows Phone (33)
Windows Server 2008 (165)
Windows Server 2012 (84)
Windows Server 2016 (23)
Windows Vista (52)
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, 1968👍, 1💬
Popular Posts:
What is AccelerometerSt.exe process - Hp Accelerometer System Tray? Process AccelerometerSt.exe is t...
What is the "csrss.exe" process on windows 7? Is the "csrss.exe" process a virus? Can I terminate th...
What files are stored in the "C:\Users\<userid >\AppData\Local\M icrosoft\Windows\Tempor. ..
What is the startup program "QuickSet MFC Application - quickset.exe" on my Windows 8 computer? Can ...
What is AcroIEHelper.dll - DLL file - Adobe Acrobat IE Helper Version 6.0 for ActivieX? DLL AcroIEHe...