How to replace \ by \\ in string

You can use raw string literals:

julia> raw"C:\Users\xxx\..."
"C:\\Users\\xxx\\..."
7 Likes