Multiple Quotations in a Single Parameter

Q

Can I have multiple quotations in a single parameter for a batch file?

✍: FYIcenter.com

A

Yes, you can put multiple quotations in a single parameter for a batch file.

Quotations also be started and ended anywhere in the paramter.

Here are some examples on using quotations in a single parameter:

C:\fyicenter>Parameter-Cleaned.bat "\Program Files\Microsoft Office\Office14"
(Parameter-Cleaned.bat)
("\Program Files\Microsoft Office\Office14") () () () ()
("\Program Files\Microsoft Office\Office14")
(\Program Files\Microsoft Office\Office14)

C:\fyicenter>Parameter-Cleaned.bat \Pro"gram Fi"les\Microsoft" "Office\"Office"14
(Parameter-Cleaned.bat)
(\Pro"gram Fi"les\Microsoft" "Office\"Office"14) () () () ()
(\Pro"gram Fi"les\Microsoft" "Office\"Office"14)
(\Program Files\Microsoft Office\Office14)

C:\fyicenter>dir /b \Pro"gram Fi"les\Microsoft" "Office\"Office"14
1033
AUTHZAX.DLL
BCSLaunch.dll
IEAWSDC.DLL
MAPISHELL.DLL
Mso Example Setup File A.txt
MSOHEV.DLL
MSOHEVI.DLL
MSOHTMED.EXE
NAMEEXT.DLL
NPAUTHZ.DLL
OLKFSTUB.DLL
URLREDIR.DLL
VisioCustom.propdesc
VISSHE.DLL

 

Quotation without the Closing Mark

Remove Quotation Marks from Parameters

Introduction of Windows Batch File

⇑⇑ Windows Batch File Tutorials

2017-12-05, 152👍, 0💬