![]() ![]() ![]() All delimiters are spaces (but can be anything). But I was wondering, is there a way to have only part of the file name placed into each line, on mass?ĪBCD 0123 ABCD AB-CD AB19 0123 AB19 AB19.jpgīasicly a whole mix of alphanumerics some fixed length some not. I was searching for a way to do just this, and found the original Script by John Beardsworth works with changes to the meta line needed. tQualifier(XMPConst.NS_DC, "title", "", "lang", "x-default") MyXmp.appendArrayItem(XMPConst.NS_DC, "title", Title, 0, XMPConst.ALIAS_TO_ALT_TEXT) tQualifier(XMPConst.NS_DC, "description", "", "lang", "x-default") MyXmp.appendArrayItem(XMPConst.NS_DC, "description", Desc, 0, XMPConst.ALIAS_TO_ALT_TEXT) leteProperty(XMPConst.NS_DC, "description") Title.push(myXmp.getArrayItem(XMPConst.NS_DC, "title", i)) Var titleCount = untArrayItems(XMPConst.NS_DC, "title") ĭesc.push(myXmp.getArrayItem(XMPConst.NS_DC, "description", i)) Var descCount = untArrayItems(XMPConst.NS_DC, "description") Var myXmpFile = new XMPFile(selectedFile.fsName, XMPConst.UNKNOWN, XMPConst.OPEN_FOR_UPDATE) Var FileName = decodeURI(selectedFile.name).replace(/\. $/, '') * Original script modified by Stephen Marsh - 2021įT = MenuElement.create("command", "Add Filename to Description and Title", "at the end of Tools") I have adjusted an existing script for Description to also include the Title: It turns out that I didn't have a script that writes the filename to both the Description and Title metadata fields. ![]() Var selectedFile = new Thumbnail(thumbs) EXIFTOOL COMMAND MODIFY TITLE CODEI posted the following code earlier in the topic thread, which adds the file name to the description field, removing the filename extension. MyXmpFile.closeFile(XMPConst.CLOSE_UPDATE_SAFELY) Īfter running all three scripts, I used ExifTool to confirm which metadata tags were written:Īnd here is the result from Bridge's Metadata panel for a file titled "colour FILE-Test.psd": MyXmp.appendArrayItem(XMPConst.NS_DC, "title", Title, 0, ![]() Var myXmpFile = new XMPFile( selectedFile.fsName, XMPConst.UNKNOWN, Var Title = decodeURI(selectedFile.name).replace(/\. $/, '') If (ExternalObject.AdobeXMPScript = undefined) ExternalObject.AdobeXMPScript = new Var items = xmp.countArrayItems(ns, prop) ĪrrItem.push(xmp.getArrayItem(ns, prop, i)) įT = MenuElement.create("command", "Add FileName to Title", "at the end of Tools") tadata = new Metadata(newPacket) ĮxternalObject.AdobeXMPScript = undefined Var newPacket = xmp.serialize(XMPConst.SERIALIZE_USE_COMPACT_FORMAT) Xmp.setLocalizedText( XMPConst.NS_DC, "description", null, "x-default", Desc = decodeURI().replace(/\. $/,"")) Xmp.deleteProperty(XMPConst.NS_DC, "description") Var Desc = getArrayItems(XMPConst.NS_DC, "description") Var selectedFile = new Thumbnail(thumbs ) If (ExternalObject.AdobeXMPScript = undefined) ExternalObject.AdobeXMPScript = new ExternalObject("lib:AdobeXMPScript") Here is the code for Filename to Description:įileToDesc = MenuElement.create("command", "Add FileName to Description", "at the end of Tools") Var menu = MenuElement.create( "command", "Add filename to Credit", "at the end of Tools") Bridge script to write filename to Description, Credit Line, andTitle lines I did manage to hack an existing script to add the Filename to the Headline into the Credit: I could possibly combine them with time/effort, but no promises as I'm new to scripting. Useful for if many pictures do not have the CreateDate exif-property, but do have the DateTimeOriginal exif-property.I don't have one script that does all three. mp4s:Įxiftool -overwrite_original "-datetimeoriginal PeopleTags.txt Exiftool sort photos to subfolders of Camera make and camera modelĮxiftool -r -v -overwrite_original -ext jpg "-filename Exiftool add CreateDate Exif Property and Copy DateTimeOriginal Exif Property Value into It Exiftool show all available EXIF tags of a fileĮxiftool -G1 -a -s Exiftool write all available date fields in EXIF data to first 15 characters of the file name (f. When it comes to mass editing lots of files, nothing beats the command line. Using this as my personal notepad, so to speak might be useful for someone. Several Exiftool commands I have used to edit/sort my pictures and improve metadata. Useful Exiftool Commands (cheat sheet / examples) ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |