WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

How To
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

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:   W13181
Filename:   Retain Quotation Marks in WB Command Lines.txt
File Created: 1999:04:15:16:52:18
Last Updated: 1999:04:15:16:52:18