I’m doing a deep dive of my older files and found that I have a lot of orphaned XMP files that were attached to raw files that I’ve deleted. Can someone suggest how to clean them out?
I will probably need a lot of step by step directions if I have to go command line.
This sparks some ideas to me using a Bash script, although it would most likely need a WSL with something like Ubuntu, which I’m not sure if sure you are familiar with.
Some time ago, I wanted to do something similar for JPEGs that had a pair with a RAW, and keep those that were in-camera edits (named slightly differently I think, and therefore not paired).
I didn’t look in too deep but last night I just did a simple Google search and there were a few proposed scripts to do this… I think one was on a thread in the DPreview website
maybe ask chatGPT for a script. Just specify, how to determine orphans and it will generate a proper script (better let it create an additional verbose only mode, so you can check the result before running the delete mode)
I’m very loathe to ask GPT about anything! But I hear tell that folks do get valid results that cut down program typing time. Once fairly fluent in shell, my brain cells are now so dim that I feel like a beginner again. Maybe I should try it.
My top-level culling is going through the camera JPGs, deleting the rejects, and running a script that looks for raw files without a JPG and deletes them. But that’s in one directory, so I don’t think it uses find which is the key to multi-directory/recursive stuff.
I thought there was a Linux-under-windows thing. Some sort of thing. I seem to remember seeing something like Unix utilities for Windows, but it was a looong time ago.