Copy clean file path is different in Mojave

Hi!


Copy clean file path (command+alt+c) in Mojave works different than earlier versions of OS. We use file/folder paths for communication through emails in the office.


Example earlier MacOS:

/Volumes/Network_drive/Folder/Folder/Folder/File.jpg


Example Mojave:

afp://192.168.100.20/Network_drive/Folder/Folder/Folder/File.jpg


Is there a workaround so that the file paths work with /Volumes/ instead of afp://192.168.100.20


Thanks in advance!


Regards,


Patrick

iMac (Retina 5K, 27-inch, Late 2014), iOS 12, null

Posted on Sep 26, 2018 11:58 AM

Reply
8 replies

Sep 26, 2018 1:32 PM in response to pvhvw

If you want the same behavior as in High Sierra, you want to click once on a mounted filesystem file in the Finder, and then simply copy/paste it into the Terminal. This will result in a proper POSIX path as /Volumes/… . In High Sierra, the POSIX path white-space is unescaped after the paste, but in Mojave it is escaped with backslashes.


Where Mojave is different, is when you select a remote mounted filesystem file, and then press option + Finder : Edit menu : Copy whatever as pathname. When you paste that in Mojave, it will bear the mounted share protocol path as you exhibited above.

Sep 30, 2018 1:30 AM in response to pvhvw

Forget about option+command+C, and option+command+V.


All you have to do with that Automator Quick Action solution is single-click a file or folder, and then choose the Quick Action Automator name from the Finder application menu : Services menu. It transforms the afp:// address of the file or folder that you selected to the pure POSIX path of it, and tosses it on the clipboard for you.


The one remaining step is to simply press command+V to paste the POSIX path somewhere.

Sep 28, 2018 2:28 AM in response to pvhvw

Here is a quick workaround that I put together by way of Automator.


The idea is to create a new Quick Action.


Below is an image of the quick action. It tested and it seems to be working, but of course I can't offer any guarantees, but try it out. I think it is fine, and is self-explanatory.


You can add a shortcut to it, and thus make it as quick as the old way.

So you control-click a file, use the Quick Action from the menu, or you can select and press the designated shortcut, like you are used to.


User uploaded file

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Copy clean file path is different in Mojave

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.