Quantcast
Channel: DEVONtechnologies Community - Latest posts
Viewing all articles
Browse latest Browse all 17159

Create set list of custom meta data field from files

$
0
0

If the number of such files is sufficiently large as to render manual input impractical, try this script:

-- Successfully tested with a small group of documents.
-- This script should be run from DT's scripts menu. Make sure that DT has permission to use System Events.
-- Before you run this script, (1) created a new custom metadata set, (2) create a new entry in Values, and (3) make sure your cursor stays in the input field of the entry!

property groupUUID : "19255B78-86CE-4D8D-9094-183FEF6D973D" -- use the UUID of your group hosting all those documents

tell application id "DNtp"
	set theGroup to get record with uuid groupUUID
	set theDocuments to children of theGroup
	if theDocuments is {} then return
	set theList to {}
	repeat with theItem in theDocuments
		set end of theList to (name of theItem)
	end repeat
	delay 5
	my CreateNewMetadataSet(theList)
end tell

on CreateNewMetadataSet(aList)
	tell application "System Events"
		repeat with a from 1 to length of aList
			delay 0.5
			set the clipboard to (item a of aList) as text
			keystroke "v" using command down
			delay 0.5
			keystroke return
		end repeat
	end tell
end CreateNewMetadataSet

Viewing all articles
Browse latest Browse all 17159

Trending Articles