How to configure Julia to recognize Backslash: \


#1

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


#2

You just need to escape the backslash (https://en.wikipedia.org/wiki/Escape_character):

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

#3

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

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