Mac Tags (Created and Where from)

Started by ExifBear, December 22, 2019, 07:04:02 AM

Previous topic - Next topic

ExifBear

First, let me say WOW! I usually struggle with techie toys, and I seldom even touch Terminal on my Mac. But ExifTool turned out to be user-friendly beyond my wildest dreams.

I have a folder containing almost 300 files I downloaded from the Internet. Most have the extension .html, though a few are .pdf or .webarchive. I'm using Mac with Mojave OS. When I click on a file's icon, the tags I see include "Title," "Author," "Created" (which I think is the date I downloaded the file) and "Were from" (the source URL).

I would like to export a list of all of these files, along with those four categories of information, to a Numbers spreadsheet. The following command works perfectly (and instantaneously), with a couple caveats.

exiftool -T -r -filename -Title -Author -Source -Created /Users/davidblomstrom/sites/politix/zzzdownloads2 > out1.txt

First, no values are displayed for -Source or -Created. I tried -URL, -Where and -Date without success. Can anyone tell me what to type in to extract data for the Finder tags "Where from" and "Created"?

Second, the command apparently ignores files with the .webarchive extension. Is there a way to modify the command so it includes them? Alternatively (and perhaps even better), is there a way to type a command that processes .webarchive files separately?

Incidentally, here's the forum post where I learned about ExifTool -- https://apple.stackexchange.com/questions/378117/batch-exporting-metadata-from-finder

I had to visit your site to figure out what I was doing wrong and stumbled across the command that finally worked for me.

Thanks for such a great utility!


ExifBear

P.S. I also tried -WhereFroms and -DownloadedDate without success.

Phil Harvey

Quote from: ExifBear on December 22, 2019, 07:04:02 AM
Can anyone tell me what to type in to extract data for the Finder tags "Where from" and "Created"?

Use this command on MacOS to see absolutely all available tags:

exiftool -api requestall=3 -a -G1 -s FILE

Normally the MacOS system tags are not extracted because they require running external utilities (mdls and xattr), which slows down the processing.  Setting the API RequestAll option to 3 causes the MacOS tags to be generated.

QuoteSecond, the command apparently ignores files with the .webarchive extension. Is there a way to modify the command so it includes them? Alternatively (and perhaps even better), is there a way to type a command that processes .webarchive files separately?

To process them with other files, add -ext+ webarchive to the command.  To process them alone, use -ext webarchive.

QuoteIncidentally, here's the forum post where I learned about ExifTool -- https://apple.stackexchange.com/questions/378117/batch-exporting-metadata-from-finder

Ah yes.  StarGeek provides great support for ExifTool on StackExchange (and here too of course!).

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

ExifBear

Wow, thanks for the quick response.

One more question. I probably didn't format the command correctly, because I got a ton of data crammed into a single column. I tried the following command, hoping to output it as a csv file that will channel the data into separate columns in my style sheet. But it doesn't work.

exiftool -csv -api requestall=3 -a -G1 -s /Users/davidblomstrom/sites/politix/zzzdownloads2 > out1.csv

How should I change it?

Thanks.

StarGeek

I'd suggest running the command on just one file in which you know exactly what data you're looking for.  Then look at the first row in the column that holds that data. That's the tag name.  Copy/paste that into your command with a leading dash.  For example, if the top row says "Author", add -Author to your command, separated from other parts of the command with spaces.  That will limit the output to only the tags you specify.

I really think that the tags you're looking for will have the MD in them, as shown on the MacOS tag page.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype