• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Copy Path

Participant ,
Jan 20, 2023 Jan 20, 2023

Copy link to clipboard

Copied

I have a script that used to copy the full path of a selected file. The script no longer works.

Adobe Bridge v 13.0.2.636

Script:

#target bridge
if( BridgeTalk.appName == "bridge" ) {
bridgePath = new MenuElement("command", "Path to Clipboard", "at the end of Thumbnail");
}
bridgePath.onSelect = function () {
pathToClipboard();
}
function pathToClipboard(){
var sels = app.document.selections;
app.system("echo "+decodeURI(sels[0].spec.fsName) +"|clip");
}

 

Script location:

C:\Users\{me}\AppData\Roaming\Adobe\Bridge 2023\Startup Scripts

 

Thanks!

TOPICS
How to , Problem or error , Scripting

Views

530

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 21, 2023 Jan 21, 2023

Copy link to clipboard

Copied

Try this one from @Lumigraphics:

 

https://www.dropbox.com/sh/mg817g9a9ymbasi/AADTmXUVxmFfM58bcyYE7yiwa?dl=0

 

(edit: incorrect script code removed)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jan 21, 2023 Jan 21, 2023

Copy link to clipboard

Copied

Bridge gave me an error:

Untitled-1.jpg

So I updated to v 13.0.2.636 (the same version!)

It gives the same error:

'Line 31: #include "prefsReader.jsxinc" //shared prefs read code

File or folder does not exist'

 

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 21, 2023 Jan 21, 2023

Copy link to clipboard

Copied

Ah, it isn't a stand alone script, it relies on a missing preference file.

 

You will need to download the entire utility script pack from the link previously provided.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 22, 2023 Jan 22, 2023

Copy link to clipboard

Copied

This is only a valid script on Windows, the Mac uses the pasteboard. Use my script in the Utility Script Pack

https://www.dropbox.com/sh/mg817g9a9ymbasi/AADTmXUVxmFfM58bcyYE7yiwa?dl=0

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jan 06, 2024 Jan 06, 2024

Copy link to clipboard

Copied

I am unable to get copy full path with filename to work.

Does it work with the current version of Adobe Bridge? If yes, please give instructions on which files are needed and where to place them.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 06, 2024 Jan 06, 2024

Copy link to clipboard

Copied

If you only need a script to copy the file path, try this modification of your origninal script. It should work on Bridge 13 and 14 on Windows.

#target bridge
if( BridgeTalk.appName == "bridge" ) {
    bridgePath = new MenuElement("command", "Path to Clipboard", "at the end of Thumbnail");
    }

bridgePath.onSelect = function () {
    pathToClipboard();
    }

function pathToClipboard(){
        var sels = app.document.selections;
        app.document.copyTextToClipboard(sels[0].spec.fsName);
      //  Window.alert("File path copied to clipboard\n\n"+sels[0].spec.fsName)
    }

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jan 06, 2024 Jan 06, 2024

Copy link to clipboard

Copied

Awesome! Thanks. 🙂

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jan 07, 2024 Jan 07, 2024

Copy link to clipboard

Copied

It stopped working after I rebooted my computer. The script is still in place:

C:\Users\{me}\AppData\Roaming\Adobe\Bridge 2023\Startup Scripts\Bridge CC Copy Path.jsx

if( BridgeTalk.appName == "bridge" ) {
    bridgePath = new MenuElement("command", "Path to Clipboard", "at the end of Thumbnail");
    }

bridgePath.onSelect = function () {
    pathToClipboard();
    }

function pathToClipboard(){
        var sels = app.document.selections;
        app.document.copyTextToClipboard(sels[0].spec.fsName);
      //  Window.alert("File path copied to clipboard\n\n"+sels[0].spec.fsName)
    }

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jan 07, 2024 Jan 07, 2024

Copy link to clipboard

Copied

LATEST

So I had to save that script to ...\Bridge 2024 \Startup Scripts.

Now it works again. I don't know why it worked for a time yesterday.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines