You can right click an asset and copy the reference path inside the editor. It’ll give you the correct formatting - just take the portion of the string inside quotes.
Oh. Are you copying that path from Windows Explorer? Do it in the Editor. Just right click on the asset in the Content Browser and hit ‘Copy Reference Path’. The string will contain a bit of extra stuff you don’t need. Just delete everything not in quotes.
Once you have it in your code, it’ll be easy to figure out the formatting for future.