Jump to content

escape characters for file paths

Recommended Posts



I use the file navigation within Alfred often and I like to go to a path and then use alfred's "Copy Path to Clipboard" action. I have the "Escape path on 'Copy Path to Clipboard' action preference checked, but when I paste into a text editor it does not escape spaces in the file path. Or am I wrong to think this should escape spaces in a path?


I am running the latest version of alfred and 10.14.6





Link to post

@sepulchra I've just tested this and it works as intended. Can you please post an example path which isn't being escaped (i.e. paste the output of Alfred's copy), and also what you're expecting?


Also, if you use cmd+c on one of the files in the navigation, do you get an escaped path?

Link to post

Thanks @Andrew Here is my pasted path using the copy to clipboard file action: '/Volumes/Remote Audio III'  and here it is with command+c '/Volumes/Remote Audio III'


I'm expecting the path to paste like this: '/Volumes/Remote\ Audio\ III'   


is that not correct?



Link to post

@sepulchra Alfred is wrapping in single quotes instead of escaping spaces. If you do both like in your example, then the backslashes would be treated literally.


Open terminal and type:


cd '/Volumes/Remote Audio III'


and it'll work as expected.

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...