Darktable filtering

Hi everyone,

i have a question for you darktable users.

I most of the time take pictures in RAW+JPEG (unfortunately not ALL the time) but now I have a tone of pictures for which i don’t mind deleting the RAWs.
As I don’t want to do it manually, I would like an automatic process. Specifically, I wan’t to keep a RAW file only if : it has been tagged with a certain score (stars) or if it has a custom history or it has no associated JPEG.

I tried to to it with the “collections” : scores and history is easy, but I don’t know how to select only RAWs having no associated JPEGs…
(The section Darktable>Group>Head/Tail won’t do because it also selects single JPEGs or single RAWs… plus I don’t want to delete RAWs copies)

I’m probably missing something…
Do you know how to do that ?

Thanks a lot :slight_smile:

Hi,
Not possible by default but maybe your could try to filter by filename AND file type. Associating same file type and extension could help but you will unfortunately need to do some sort manually after that.

I think that’s the tricky bit, and not possible from within dt: filtering only looks at one file at the time, so there’s no way to make selection of a file dependant on another file (or its non-existence).

And while a bash script could do that part, it will problems with the other conditions (requiring reading the sidecar files or the database).

Depending on how many files we’re talking about, and provided the jgps have been imported into dt, I’d try something like:

  • selecting all raw files that don’t have the required rating not a history stack (those would be files eligible for deletion)
  • give those an unused colour label (to see them better after the next step)
  • add all jpg files to the selection
  • order by filename.

That should put associated raws and jpgs side by side.

Then it’s a matter of manually selecting the raws you want to delete…

In next version, you will be able to use following filters :

  • filename/extension => only RAW files
  • grouping => only group leader (which only select group leaders if a “real” group exists contrary to collections)

but that will requires that you only have groups of RAW+JPEG. If you have groups of multiple raw, that may fail… In that case, I fear that your only solution will be use lua scripts

2 Likes

Thanks for your answers !

Yeah I tried that nut I couldn’t get to group by file type I think, but next version seems to have that ! (see AlicVB answer)

The thing is that i have a certain number of file and if I have an automatic method I prefer that.
But yeah, I though about a semi-automatic method and I would like to get your point of view before :slight_smile:

Oh great ! That is very nice for my use-case indeed !
And honestly the case where I have additional RAW is not an issue : I will also filter by history/stars and if I delete a raw without history, it’s not perfect, but its ok !

But there is a point where getting the automatic method to work correctly takes up more time than just doing the job by hand, especially for a one-off job

Yes your absolutely right ! “Correctly” is hard to do…