Backslash in Name causing bot-generated file location to create folder

I have the following filename prefix when a bot generates a file:

CONCATENATE([DO Number]," ",[Customer Key].[Customer Name])

This works fine 99% of the time. The exception occurs when the Customer’s name contains a backslash.

Eg: “Jane D/O John” where D/O is part of her name.

The result is that the folder where the file should be has a new folder within it called “12345 Jane D” and in that folder contains the file with name “O John”.

How do I overcome this problem of the backslash without changing the customer’s name entry?

One option could be to replace such short forms as “D/O” with “Daughter of”

So the expression could be something like

CONCATENATE([DO Number]," ", SUBSTITUTE([Customer Key].[Customer Name],“D/O”, “Daughter of”))

If there are more instances of such backslashes such as “S/O”, more such wrapping by SUBSTITUTE() could be used.

In general in a file name, it maybe better not to use a “/” because it is very much used in folder path creation. A similar case would be, we do not use “@” in an email address except to precede the domain name.

1 Like