Syntax
Syntax

Reputation: 496

Get the full network path of a file on a Mac - terminal

I'm trying to get the network file page e.g. smb://server.local/tech/file.pdf

You can see this information on a files "Get info" window but I can't see a way of getting this with the command line (or even Applescript).

Edit: I currently have this:

on open filePath
    set filePath to POSIX path of filePath
    set the clipboard to filePath as text
end open

But it only copied the mounted path and not the smb:// path.

Upvotes: 5

Views: 5603

Answers (1)

gadgetmo
gadgetmo

Reputation: 3172

Automator will do this.

  • Ask For Servers
  • Copy to Clipboard

Full Network Path

Download it here.

Upvotes: 1

Related Questions