Problem with adding QueueItem containing backslash

Hi guys,

I am using the Bulk Add Queue Items activity and one of the columns in the data table I am adding is a string containing a single backslash. However, when this data table is added to a queue the queue shows that the string that was added contains two backslashes instead of one For example if the data table has the entry first\last the queue item shows the entry to be first\\last

Any help would be greatly appreciated!

A backslash is what’s called an escape character, you use it when you want a special character in the line. For example n is just the letter, but \n is a newline. Since your string has a single backslash when it gets added to the Queue it becomes \ which means “don’t escape anything, literally write a backslash”.

Okay right now I am using String.Replace(“\\”,“\”) when the string is being extracted from the QueueItem. Is this the best solution or is there someway to indicate a backslash that is not an escape character? Thanks!

That’s probably the best way. The escape characters are part of the language so you can’t just indicate not to use them.

Okay thanks!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.