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

Copy Filename to Clipboard

Explorer ,
Mar 20, 2014 Mar 20, 2014

I'm looking for a script that will copy the filenames of files selected in Bridge CC to the clipboard. Does anyone have one?

I did read an old post that referred to one and had a script - but it gave an error, and I think it must have been for an older version of Bridge. Also, it didn't include the file extension, which I would want to do.

Thanks!

G

TOPICS
Scripting
1.6K
Translate
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

correct answers 1 Correct answer

Enthusiast , Mar 20, 2014 Mar 20, 2014

There is no direct way of writing to the system clipboard unless you use an external library as can be be found at Paul's site  (Windows only).

http://www.ps-bridge-scripts.talktalk.net/

There are work-a-rounds see http://www.ps-scripts.com/bb/viewtopic.php?p=15322

The easy way is to write the information to a text file, here is an example of writing the filenames to a text file on the desktop.

The filename will be the same as the current folder name in bridge.

#target bridge

if (BridgeTalk.appName ==

...
Translate
Enthusiast ,
Mar 20, 2014 Mar 20, 2014

There is no direct way of writing to the system clipboard unless you use an external library as can be be found at Paul's site  (Windows only).

http://www.ps-bridge-scripts.talktalk.net/

There are work-a-rounds see http://www.ps-scripts.com/bb/viewtopic.php?p=15322

The easy way is to write the information to a text file, here is an example of writing the filenames to a text file on the desktop.

The filename will be the same as the current folder name in bridge.

#target bridge

if (BridgeTalk.appName == "bridge"){

var FtoFiles = MenuElement.create( "command", "Filenames to file", "at the end of Tools");

}

FtoFiles.onSelect = function (){

var files = app.document.selections;

var fileNames = new Array();

for(var a in files){fileNames.push(decodeURI(files.spec.name));}

var folderName = decodeURI(Folder(app.document.presentationPath).name);

var f = new File(Folder.desktop + '/' + folderName + '.txt');

f.open('w');

f.write(fileNames.join('\n'));

f.close();

};

Translate
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
Explorer ,
Mar 20, 2014 Mar 20, 2014
LATEST

Thanks Philip!

I appreciate the links, and especially the script - it saves me considerable work!

G

Translate
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