ERROR: Type Into 'File name': Special keys syntax error. Encountered invalid special key action at text position: 32

Hi all,
I am trying to upload attachment using directory.getfiles() to a website, and use ‘type into’ activity to choose the file but I encountered this error: Type Into ‘File name’: Special keys syntax error. Encountered invalid special key action at text position: 32.

This is how my ui element looks like:
image

May I ask for any suggestion to fix this issue?

Hi,

If your filename contains "[" character and you use Hardware Event, can you try to escape it like "[["?

For example, if filename is "[test]text.xlsx", it will be "[[test]text.xlsx"

or simply yourString.Replace("[","[[") might work.

Or as another approach, if SimulateType is availabel for the element, it will work without escaping.

Regards,

Sorry I don’t really get it. Where should I use this yourString.Replace("[","[[")?

Hi,

What is your input of TypeInto activity?

If you use single variable, please add the following to it.

.Replace("[","[[")

Regards,

I see, it doesn’t show error anymore but still can’t perform the tasks as I expected. :smiling_face_with_tear: What I am going to do now is to set the lastest file by ‘assign’ activity, and upload the latest file as an attachment to the website, and here is how the ui element looks like:
image

Should I use ‘type into’ activity or is there other way to solve this issue?

Cheers,

Hi @RPA_Innovation

Could you please tel which folder you are going to get files
And please show the input files inside the folder if it is possible…

Thank u

Regards
VP

Hi,

Is your system java base? Perhaps you should raise a new topic because it’s apart from title of this topic. it will help those who face same issue.

Regards,