Log Downloads with "Where from:"

I recently downloaded an image, made some changes, and saved it as a new image. A few weeks later, I wanted to find the original downloaded, but I could not remember what it was called or where I downloaded it from. I tried searching Safari history, trash, Finder by date and possible names, etc. I even tried doing an image search with the altered image, but it's beyond recognition.

It would be handy to have a running log of each file added to the Downloads folder and the URL showing where the file came from. Finder Info sometimes includes a "Where from:" field containing the URL of the downloaded file, but if the kMDItemWhereFroms attribute is empty, no love.

So I started on a macro that monitors the Downloads folder, and when a file is added it is written to a text file with the date and front URL from Safari.


Log Downloads.kmmacros (2.9 KB)

The output looks like this:

2024-06-20 Thu @ 09_40_36 | fafb5aa856c80fcc757f66a0900fc72c66e0136a.png | https://forum.keyboardmaestro.com/unread | (Unread topics - Keyboard Maestro Discourse)

This isn't perfect because 1) it's not recording the actual file URL but the browser window URL, and 2) the new file may not be from Safari. It's better than nothing, and I imagine there are download manager extensions that would work, but I don't necessarily need all of those features.

Any thoughts on a different approach for tracking files added to downloads and where they came from?

What about if instead of writing to a log, you add the URL to the image's comment file attribute?

Both of you have good ideas here.

1 Like

I like that, but I want to be able to look at what happened in the folder without knowing anything about the file. So searching the files comment wouldn't help. In other words, I wouldn't know what to search for.

Ah ok. I must have misunderstood. I thought the idea was that you wanted to know where an image file came from.