How Can I Make Winbatch Recognize Quotation Marks as Text?
Keywords: quotation marks quote marks
Question:
I am trying to put strings together and then write them to a file. I then want to import this information into access. In order to import the information I need to have it in this form: "info1","info2","info3",etc. My problem is that I am having problems with the quotation marks. I am getting illegal syntax errors. My line of code looks something like this:x=Strcat(""%info1%"",""%info2%"",""%info3%"")How can I make it recognize the quotation marks as text? I have tried the num2char command but this doesn't work either. WinBatch will recognise all three different kinds of quote marks:
'single quotes'
"double quotes"
`back quotes`so just use a different kinf to keep WinBatch happy. Like...
x=Strcat(`"%info1%"`,`"%info2%"`,`"%info3%"`) Message("Try 1",x)But I think you really want:x=Strcat(`"%info1%","%info2%","%info3%"`) Message("Try 2",x)or maybe better yet...q=`"` ; a quote qcq='","' ; quote comma quote x=Strcat(q,info1,qcq,info2,qcq,info3,q) Message("Try 3",x)
Article ID: W13181Filename: Retain Quotation Marks in WB Command Lines.txt