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, ∼3908🔥, 0💬
Popular Posts:
How to verify if your system is connected to the wireless network? Windows system has two commands "...
I have created a table in MS Access. How do I create a form to help enter data into the table? Assum...
Can I disable Windows service "COM+ Event System" to speedup my computer? Windows service "COM+ Even...
A collection of 12 tutorials on creating, deleting and managing Windows services: What is a Windows ...
How To Download and Install Media Player Classic? If you are looking for a simple open source DVD pl...