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

Script for copying keywords to description field

Guest
Aug 07, 2011 Aug 07, 2011

Copy link to clipboard

Copied

Does anyone have a script that can be used in cs5 to copy the keywords to the description field?

Thanks

Mark

TOPICS
Scripting

Views

6.7K

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

correct answers 1 Correct answer

Community Expert , Dec 08, 2022 Dec 08, 2022

@Lumigraphics is correct, there is no way in Bridge (in the app or via scripting) to change file Date Created.

ExifTool is your best bet to do the batch edit you want. 

ExifTool is an amazing tool but it is command line, which can be cumbersome if you're not used to it.

For what you want to do, I think this would be the command:

 

exiftool "-filecreatedate<datetimeoriginal" "DIR"

 

...where DIR is the name of a directory/folder containing the images. 

 

I tested this and it works for me, meaning

...

Votes

Translate

Translate
replies 144 Replies 144
Community Expert ,
Jul 10, 2022 Jul 10, 2022

Copy link to clipboard

Copied

@X-T4Newbie here is an update script with the option to choose Exif Date Time Original or IPTC Date Created.

 

https://www.dropbox.com/s/jyr89oeek97c2fq/Copy_Select_Keywords_to_Description_2022-07-09.jsx?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
New Here ,
Jul 10, 2022 Jul 10, 2022

Copy link to clipboard

Copied

Hi Greg, @X-T4Newbie here.  Thanks for the update, dated 07/09/22.  I think we still have an issue with date; I tried both date dropdowns and for the image using, only the IPTC Core camera "Date Created" is being picked up, not the potentially-modified EXIF "Date Time Original"!  Thanks for the reminder mouse-over comments to keep each dropdown straight in my mind.  Do you see same issue?  Bob 

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
New Here ,
Jul 10, 2022 Jul 10, 2022

Copy link to clipboard

Copied

@X-T4Newbie was WRONG!  The script IS working as designed.  I needed to leave image(s) in Bridge and then come back to it(them) to refresh displayed Description metadata.  All is good!  Disregard my prior Post.  Bob

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 ,
Jul 10, 2022 Jul 10, 2022

Copy link to clipboard

Copied

Yes, I have to leave the images and come back to see the new metadata. I'm glad it's working!

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 ,
Jul 10, 2022 Jul 10, 2022

Copy link to clipboard

Copied

@gregreser â€“ Perhaps try adding:

 

app.document.chooseMenuItem("PurgeCacheForSelected");

 

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 ,
Jul 10, 2022 Jul 10, 2022

Copy link to clipboard

Copied

@Stephen_A_Marsh that's intersting, I don't know about that! Would that go after the XMP has been saved to the (xmp.serialize)?

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 ,
Jul 10, 2022 Jul 10, 2022

Copy link to clipboard

Copied

It's a kludge/hack... Probably only worth exploring if it works manually after running the script while the files are still selected in Bridge (right-click > purge cache for selection). It's an alternative to force update the view rather than navigating away and back again. Example on page 1 of this topic, many more examples in old topic threads if you search.

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 ,
Jul 11, 2022 Jul 11, 2022

Copy link to clipboard

Copied

Thanks, I'll give it a try.

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 ,
Jul 11, 2022 Jul 11, 2022

Copy link to clipboard

Copied

Funny, I responded to a thread and mentioned Paul Riggot's use of "PurgeCacheForSelected" but I completely forgot about it.

It's not working for me, but I'll keep playing with it.

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 Beginner ,
Jul 10, 2022 Jul 10, 2022

Copy link to clipboard

Copied

Greg, one issue I'm having running the Script -- not the Script's fault:  My workflow has been to transition from all images in Subject/Date Created folders within Pictures to just ONE Picture folder where one can query by date(s) and/or Keyword(s) desired slideshow.  The latter is where all images now reside input to you new Script.  My delima:  Having a Script "Make Descriptions 'To Do'" folder (about 1,300 now) vs. a "Descriptions 'Already Done' folder (only 14 done now).... to make workflow flow easier.  As is, it takes multiple passes using the new Script for each unique combination of Event, Place, People, and/or Thing per selected image(s).  What do you see the pros/cons of Script providing for an different Output subfolder location to help keep track of progress?  I'm tempted to say to you: keep Scrpt as is; I'll just tough it out. Bob   

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 ,
Jul 11, 2022 Jul 11, 2022

Copy link to clipboard

Copied

Do you use labels? If not, I could have the script add a label to each image after the new description is saved. The label could be the standard "Approved" (green label) or a custom "Descriptions Already Done" (white label). You could then filter by "No Label" or sort by label. Alternatively, you could manually add a label to the selected files after the script runs and you are happy with the descriptions.

 

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 Beginner ,
Jul 11, 2022 Jul 11, 2022

Copy link to clipboard

Copied

Yes, I am using Labels, but having the Script [optionally] use one of the Label's colors on output is a great idea!  Once I see modified Script (yes, I know I'm causing script "Requirements-creap..." and will stop it!), I'll clear one of the colors to exclusively mean for now "Description finished." 

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 Beginner ,
Jul 11, 2022 Jul 11, 2022

Copy link to clipboard

Copied

I'll clear one of the colors to exclusively mean for now "Description finished."   It's GREEN.

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 ,
Jul 11, 2022 Jul 11, 2022

Copy link to clipboard

Copied

I added an option to add a green "Approved" label after the description is written.

 

https://www.dropbox.com/s/bo62xpfv4n4i94x/Copy_Select_Keywords_to_Description_2022-07-10.jsx?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
Community Beginner ,
Jul 12, 2022 Jul 12, 2022

Copy link to clipboard

Copied

Greg, the "Copy Select Keywords to Description" script is working great!  Thank you! Thank you!  I now have 181 images in the "Green" label camp.... and proceeding... all in one folder of images!  The ability to select multiple images and process them at once is super!  One condition where you might add a pop-up Warning is when the chosen Date Created field, for whatever strange reason, is missing.  In that case, we get a Green label with no Description output.... which may not be noticed while rapidly moving through the images. 

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 Beginner ,
Jul 12, 2022 Jul 12, 2022

Copy link to clipboard

Copied

FYI  When one chooses to include various People in a Description, process frequently becomes one-image-at-a-time process, which slows down throughput... but that's my personal choice to make Description(s) that are that granular. 

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 ,
Jul 12, 2022 Jul 12, 2022

Copy link to clipboard

Copied

Here's a new version which gives a list of files that did not have a Date (whichever date has been selected).

csktd_002.jpg

It will still write the keywords to the description and add the label, but at least you'll be able to back to those images and add a date. I could probably have a different outcome, like not saving the description and not writing a label or writing a different label. Not sure how complex we want to make this.

https://www.dropbox.com/s/5nvq8iun70wyvwv/Copy_Select_Keywords_to_Description_2022-07-12.jsx?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
Community Beginner ,
Jul 12, 2022 Jul 12, 2022

Copy link to clipboard

Copied

Question:  When one selects a big range of images to assign generic Description (select one, then Cntrl-A), but then using Cntrl, go back and de-selecting a few to do later including, say unique People family names, does the Script pick up all Keywords in selected range, whether or not specific image (with People) is still selected.  I've selected such a big range several times I thought had no family members, only to find their names in the script's displayed Keyword list... which led me to go back though all images one-by-one in Bridge looking for that image(s) with family member(s) I did not intend to select this first pass through...   So far, I've fould images de-selected (Cntrl) with People names I thought I had avoided my 1st pass through the group???

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 ,
Jul 12, 2022 Jul 12, 2022

Copy link to clipboard

Copied

It shouldn't mater if have de-selected some images, only keywords from images currently selected are read when you open the script. When the script opens, it starts with a blank list of keywords (none are carried over from the previous use). 

 

Do use the Metadata workspace? It might be a fast way to visually check for names in keywords. Still, doing any kind of visual culling and selection is an arduous process.

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 Beginner ,
Jul 12, 2022 Jul 12, 2022

Copy link to clipboard

Copied

Thanks for reply.   Number of Descriptions done thus far:  400.  Got another 900 of already Keyworded images to process.  Then, resume keywording remaining Library of 23,000 images.  And scan/keyword some old 35mm slides.  Script working slick... it's adicting to see how many I can knock out before my eyes blur with tiny Bridge menus!  Got your "Bad News" popup for a couple no DateTimeOriginal.... think from an old Point-n-Shoot retired long ago -- before digital Canon, then Nikon, then Sony mirrorless, and now Fuji mirrorless. 😞

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 Beginner ,
Jul 13, 2022 Jul 13, 2022

Copy link to clipboard

Copied

Is it possible to stop output of "Bad News" popup files for the no DateTimeOriginal images, rather than proceeding with outputted Description without a prepended date?  Why?  If one prefers ALL image Descriptions to have a date before any keywords, it really slows down manual process to look for displayed fail filenames among all the Green label 'done' images, whereas, if they remained as is - no output, easy to alter metadata, as needed, then proceed.  (BTW:  When I've gone to so-called "blank" Bridge DateTimeOriginal field to input correct date, the default popup date/time is exactly what I would have typed.  Hence, I just hit "Change" key to correct data which is apparently hidden originally in Bridge from our new script. Then, script completes as expected with no pop-up??? )

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 ,
Jul 13, 2022 Jul 13, 2022

Copy link to clipboard

Copied

Sure, no problem. So, if there is no date, don't write the new description and don't show the pop-up, right? Would it help if these got a red label so you would know they need attention?

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 Beginner ,
Jul 13, 2022 Jul 13, 2022

Copy link to clipboard

Copied

Greg, if there's no metadata DateTimeOriginal:

a) don't write description quite yet

b) don't set Green label - leave as is.  Thanks, but I've got other color labels (red) / ratings already in use.

c) guess don't create pop-up anymore - there's now no need; it's obvious within selected images which one(s) didn't turn Green.  We can easily highlight them, one-by-one, and go into each's Metadata Panel to "add" the hidden date. 

 

Any idea why correct DateTimeOriginal appears to be there, but hidden initially in both Bridge and to our new script?  Thanks, Bob

 

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 ,
Jul 14, 2022 Jul 14, 2022

Copy link to clipboard

Copied

I think I have incorporated the above changes in this version. I did leave a note in the results pop-up to let you know how many files were done and how many had no date. I don't think it's too intrusive and it will let you know what happened.

https://www.dropbox.com/s/tsot0f1czpiwy0r/Copy_Select_Keywords_to_Description_2022-07-14.jsx?dl=0

 

As to why correct DateTimeOriginal appears to be there, but hidden initially, it might be that the hidden DateTimeOriginal has a problem, like a formatting problem. When you open the Bridge DateTimeOriginal editor, it might be suggesting a corrected format. I'm just guessing though.

 

The next time you come across one of these files, could you post the Raw XMP data here?

Open FileInfo > Raw Data  then copy all the text in the window and paste in a reply.

 

fileInfo_XMP.jpg

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 Beginner ,
Jul 14, 2022 Jul 14, 2022

Copy link to clipboard

Copied

Greg, you were reading my mind:  When I thought about NO pop-up this morning and possibility of selecting a huge number of images at one time, I'm not all too sure how "obvious" on the screen the non-Green ones might be.  Keeping the popup with tally of # successes & # fails is a great addition! 

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