lordcommander
lordcommander

Reputation: 340

Get full path of files copied in to clipboard macos

I'm trying to read the full path of a files copied to the clipobard

After copying with this script files to the clipboard I ran this:

pbpaste > clipboard.txt

But all I got was the name of the files:

(clipboard.txt)

test.sh
test.py
myfolder

How can I get the full path so the output will be:

/path/path/test.sh
/path/path/test.py
/path/path/myfolder

Upvotes: 1

Views: 296

Answers (1)

0stone0
0stone0

Reputation: 43972

Instead off using Cmd-C, use Cmd-Option-C.

This will copy the full file path.

Using pbpaste will show the content of the clipbord with the full path.

Upvotes: 3

Related Questions