How does one make the symbol \ show up as text

I am trying make a page with instructions on how to find a particular file

Bing images are stored on my computer at C:\Users\USERNAME\AppData\Local\Microsoft\BingWallpaperApp\WPImages

The way that line appears above is how I want it to appear in Obsidian, but it shows up like this:
CUsersUSERNAMEAppDataLocalMicrosoftBingWallpaperAppWPImages

Things I have tried

![text]C:\Users\USERNAME\AppData\Local\Microsoft\BingWallpaperApp\WPImages)
which results in the broken image emoji plus the word “text”.

![text] C:\Users\USERNAME\AppData\Local\Microsoft\BingWallpaperApp\WPImages)
which just adds the space between the ] and the C, otherwise, like the original result.

Thanks for any advice!

Either change to using forward slashes, or double up on the slashes, \\, to produce a single backslash in the text \. This is due to the backslash being used to escape various other characters, to escape their ordinary meaning, but it does lead to the need to escape itself when you actually want the backslash.

In some contexts, you could also consider doing:

<code>c:\user\some\thing</code>
or
`c:\user\some\thing`

Which achieves similar effects, but also styles the text slightly different.

2 Likes

For file paths I would use holroy’s second suggestion of marking them as code to preserve the exact path.

`c:\user\some\thing`

Adding extra backslashes makes sense elsewhere but can cause confusion if you copy-paste the path.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.