Copy link to clipboard
Copied
Is it possible in Bridge to make a script that:
I've been using PHP and VBA, and have just started learning JavaScript, so I might manage to figure out something of my own if you point me in the right direction. If you could give me the script ready to use I'll be very grateful.
Our situation:
We are publishing photos in a weekly news paper and online. We have photos in one folder, ready to use. When we put a photo in production we copy it to another folder, but we would like to know if and when a photo has been used, so we're not using the same photo over and over again. It would be very nice If we can mark the original somehow with "used" and "date".
Thank you!
Using Bridge CC 6.3.1.186 x64
Here is an example of adding "Used" and the date to the title field also copying the file to a selected folder.
...#target bridge
if( BridgeTalk.appName == "bridge" ) {
copyAndDate = MenuElement.create("command", "Copy and Date files", "at the end of Tools");
}
copyAndDate.onSelect = function () {
if (ExternalObject.AdobeXMPScript == undefined) ExternalObject.AdobeXMPScript = new ExternalObject("lib:AdobeXMPScript");
var copyFolder = Folder.selectDialog("Please select folder to copy files to...",F
Copy link to clipboard
Copied
Here is an example of adding "Used" and the date to the title field also copying the file to a selected folder.
#target bridge
if( BridgeTalk.appName == "bridge" ) {
copyAndDate = MenuElement.create("command", "Copy and Date files", "at the end of Tools");
}
copyAndDate.onSelect = function () {
if (ExternalObject.AdobeXMPScript == undefined) ExternalObject.AdobeXMPScript = new ExternalObject("lib:AdobeXMPScript");
var copyFolder = Folder.selectDialog("Please select folder to copy files to...",Folder(app.document.presentationPath));
var sels = app.document.selections;
for(var a in sels){
var thumb = sels;
thumb.copyTo(copyFolder);
var md = thumb.synchronousMetadata;
md.namespace = "http://purl.org/dc/elements/1.1/";
md.title = '';
md.title = "Used " + new XMPDateTime(new Date());
}
};
Copy link to clipboard
Copied
Thank you, this was just what I needed, you made my day!
Just one question: If I just want the date and not time, how do I do that? Is it possible to show XMPDateTime as YYYY-MM-DD or DD-MM-YY?
Copy link to clipboard
Copied
Just change:-
md.title = "Used " + new XMPDateTime(new Date());
To:
md.title = "Used " + new XMPDateTime(new Date()).toString().match(/.{10}/);
This will just use the first 10 characters.