How to pass " symbol as a character

howto

#1

Hello,

I have to write a command into cmd where is nedded to write the symbol " . How is it possible to indicate that it is a character and not an ends of string?


#2

Hi @Siltra,

Use double double " you will get one

For example "value ""26363"""

You will get value"26363"

Regards,
Arivu


#3

Hi Siltra,

As I understand, you want to pass a double quote inside your string. Solution - You need write double quote two times in your string. For your reference use below method to pass " in your string.

e.g. - “My Name is ““Vikas”””
Output- My Name is “Vikas”

I hope, it will help you out.

Regards,
Vikas


#4

Thanks for yours answers. Actually it works for Uipath enviroment, but when the robot write into the command prompt it puts symbol ° instead of "

Any idea?


#5

It works fine for me @Siltra
GETCOLUMN.xaml (5.5 KB)


#6

Hi @Siltra,

Let’s say you want to print “hello” in the command prompt window.

In Command Prompt, you need to type:

echo “hello”

and it’ll print

“hello”

To mimic this via UiPath, all you need to do is place a “type into” activity and write into it

"echo ““hello”” "

or if you assign the command to a generic variable and then type that in the “type-into” activity
kinda something like this screenshot.

TL;DR - Apart from the entire line being inside double-quotations, the required word is also placed double double-quotations.

All the Best!

Regards,
Abdullah


#7

not for me :frowning:


#8

I think the problem could be some computer settings…


#9

Hi @Siltra,

can you share your XAML File?


#10

@Siltra, what’s the default language in your machine ?? I guess, this is happening only because of a different language. I’m not sure about that.


#11

What if the string you want to pass only has ONE double quotation at the end or beginning.
Using the echo hello example above.

You want the result to be:
echo "hello

I can’t seem to get it to work with only 1 double quote? It keeps giving me the incomplete expression error.
Any ideas? can I use the (U+201C) value? Thanks for any help.


#12

Hi @jgilliland
you should be able to embed the quotes like this:

"""hello" or """"+"hello"

Other times you need a slash infront like \"

Regards.


#13

the “”""+“hello” variation work. Thanks Clayton.