Collections:
Other Resources:
Quotations in Batch File Parameters
How to use quotations in double-quote pairs in batch file parameters?
✍: FYIcenter.com
Quotations in double-quote pairs in batch file parameters
take higher precedence than space characters.
So if a space character is inside a quotation, it will be
taken as part of a parameter, not as a delimiter to separate parameters.
For example, the following commands invokes the batch file with one parameter only:
C:\fyicenter>Batch-File-Parameters.bat "a b"
(Batch-File-Parameters.bat)
("a b") () () () ()
("a b")
C:\fyicenter>Batch-File-Parameters.bat "a b c"
(Batch-File-Parameters.bat)
("a b c") () () () ()
("a b c")
C:\fyicenter>Batch-File-Parameters.bat " a b c "
(Batch-File-Parameters.bat)
(" a b c ") () () () ()
(" a b c ")
C:\fyicenter>Batch-File-Parameters.bat " a b c "
(Batch-File-Parameters.bat)
(" a b c ") () () () ()
(" a b c ")
⇒ Use Quotation to Protect Space in File Name
⇐ Space - Delimiter for Batch File Parameters
2021-11-12, ∼4101🔥, 0💬
Popular Posts:
How to stop a Windows XP service getting started automatically at system startup time, or disabling ...
How to remove YahooMessenger.exe from the startup application list to gain performance and reduce se...
What is the "CmRcService.exe" process on windows 7? Is the "CmRcService.exe" process a virus? Can I ...
How do I move my library to a new computer? You must perform multiple steps before and after moving ...
What is AccelerometerSt.exe process - Hp Accelerometer System Tray? Process AccelerometerSt.exe is t...