How do I retrieve the text in the “Title” field under the Inspector’s Properties and copy it to the “Name” field or a custom metadata field? I have ~20,000 pdf records I’ve imported and want to replace the 36-character random alphanumeric “Name” field with the data from Inspector→Properties→Title field. I can replace the “Name” with the “Title” one record at a time, but this is not realistic for 20,000 records. I can live with the data in a custom metadata field, too. The data also appears in the source pdf file when I use “get info”, but I’ve been unable to develop a script that will extract this data from either the Finder or DT4.2. ANy ideas would be appreciated.
Assuming this is a one-off activity, here’s a simple way, accessible to coders and non-coders alike…
- Select a known document.
- Select Tools > Batch Process > Batch Process or press Control-Command-B.
- Press plus (+) to create a new configuration and give it a reasonable name.
- Change the action to Change Name.
- Delete the Name placeholder and click the placeholder popup at the right end of the text field.
- Scroll down and select the Properties > Title placeholder.
- Press Apply and the name will be replaced by the title, if one is present.
- Grab a larger selection of documents, open the Batch Processing pane, and press Apply or Return.

Many thanks, this technique seems to be working perfectly!
The batch technique you provided worked well and I was able to create another batch processes to remove an unnecessary text string. Embedded in the file name are two other data I would like to extract, but have not yet figured out the best way to do it: 1) Each record has a date in the middle of the Name Field (typically in the form: xxx yy zzzz, where xxx is a 3 character month name, yy is a 2-character day, and zzzz in the year). If I copy this string and paste to a custom metadata field with a date format, it correctly interprets the string as a date. Is there a simple way to extract this from the Name field? 2) Most Name strings also have a value that represents an amount, i.e. a dollar sign ($) followed by a number (two decimal places). This string appears at the end of the Name string. Is there a simple way to use batch process to extract this value to a custom metadata field, Amount? Any suggestions would be appreciated.
You’re welcome.
Is there a simple way to use batch process to extract this value to a custom metadata field, Amount?
Likely, but post a real-world example or two of what you have in terms of the filename.
PS: While the universe is not a uniform and homogenous plade, typically isn’t a good term when it comes to automation. It means, exceptions and may be needed. Not saying that’s not part of the process. Just saying it’s something to keep in mind when thinking about automation.
Here are a few examples of data in the Name field:
Costco Fri Aug 06 2010 $63.28
Coast Pet Supply Sun May 11 2008 $1.35
Barnes & Noble Sun Nov 02 2008 $45.56
CVS Fri Apr 22 2011 $62.23
There are many atypicals, too, but I estimate ±80-90% fit the clean examples.
Yes, this is doable and honestly not very difficult for a layperson.
I made it slightly harder a task by capturing the company name as well.
Custom metadata setup
Original document
After batch processing
Batch processing configuration
Scan Namelooking for aDatein everything*preceding the dollar sign.Scan Namelooking for anAmountin everything*following the dollar sign.Scan Name, starting from the beginning^, matching everything that’s not a number\D, at least one occurrence+until it runs into a space followed by any of the abbreviated day names.
I included the regular expression (regex) option to (1) show an example of how it could be done and (2) how fragile it can be when working with limited data. Imagine you went to Century 21. That company name wouldn’t match since there’s a number in it. Are there ways to right better regex? Sure, but the point is it takes knowledge, testing, and good test data to craft effective ones.
In this case, a less fragile option could be ^([\w\d\s]+)\s(Sun|Mon|Tue|Wed|Thu|Fri|Sat) matching words, digits, and spaces.
Why not (.*)\s+(Sun|…)?
- To introduce some other more specific options, e.g.,
\w. - Because
.*is easy but very often too greedy to be useful. On a side note, I am usually inclined to.+unless it’s something I know could have no occurrences, like spaces,\s*.
In general I am all for non-greedy ops. But here we want everything before the weekday. If the company name is AT& T or O‘Reilly, your RE will not match. .* or .+ will. And yes, the latter is better.
This seems to be working well; thanks again. I ended up using the “less fragile option”, which provided the flexibility of text strings with other characters.. I have only been using DT for a short time, having abandoned older software that is no longer supported. DT is quite a bit more flexible and powerful that they were (Paperless and Neat) and I’m hopeful, more long lasting.
There’s a lot of people in this forum who were using those packages. I went from Neat to Paperless to DEVONthink, also discarding Evernote along the way, once I got to DT and realized it was more than just a way to track PDFs and simple receipt tracking.
24 years in business this April
and no slight on them but DEVONthink is waaaay more powerful and flexible than those apps ![]()
Clearly, DT is orders of magnitude superior to Neat and Paperless; it’s really not even in the same galaxy. I actually did consider DT when I first started organizing documents many years ago, but thought at that time my particular needs were better served by software more narrowly focused and maybe a bit easier to learn. I’m quite happy now to move on and really appreciate the community that is actively engaged in assisting neophytes: I could not have moved from Paperless to DT without the useful advice I found here.



