Write variable with special character to a text file


I have an action that load variable from a file, the value may include special character like %

Now I need to write the value to a .bat file but in case the string include % it should be duplicate and be %%

What is the easiest way to do that ?

I understand that I need to use %!VARIABLE% in order to escape special characters in FinalBuilder but don’t know how to make it duplicate.

I guess the the String Replace action would do the trick.

EscapePercent.fbp8 (2.0 KB)

Thanks, that does the work.