How to configure Julia to recognize Backslash: \

How to configure Julia to recognize Backslash: \ in Path commands
Every one that I use:

notebook (dir = "Path")

I must edit the Path

from “C: \ Users \ … \ Documents \ Julia Software \ …”
to “C: / Users /…/ Documents / Julia software / …”

so that the command is executed correctly

You just need to escape the backslash (Escape character - Wikipedia):

"C:\\Users\\...\\Documents\\Julia Software\\..."

You could also use raw-Strings, which will escape the backslashes automatically.

julia> raw"C:\Users\...\Documents\Julia Software\..."
"C:\\Users\\...\\Documents\\Julia Software\\..."

3 Likes