Darktable newbee question: I have all my images organized on disk in folders by date. Those folders contain originals (raw files or jpgs direct from cameras/phones) and TIFFs made by stitching panoramas or HDRs.
Then there are subfolders named JPG which contain the finished JPGs from all the above.
When working in Darktable, I would like to either not import those subfolders or at least hide them in the lightbox view. Is that possible?
Maybe exclude folders named “JPG” or consider only folders up to a certain level?
The collections module lets you add rules to expand or reduce your collection. You might want to play with that and see if you can satisfy your workflow requirements.
I think a Feature Request in Github for the import/add library to ignore folders with .noimage file in them would be nice for this use case. I use it with Nextcloud.
I presume the option to not copy or import non-raw files won’t meet your need here because that would exclude tiff files.
Exactly. The “master” files may be raw, tiff or jpg (or maybe others in the future).
That actually gives me an idea. If I’d rename all JPG subfolders at that level to “.JPG”, that wouldn’t affect my workflow and my image database much (only minor changes to do), but it should make those subfolders invisible for Darktable, right?
I’ll give it a try.
Here’s my experience and opinion.
Before using darktable, my Pictures folder was basically a flat structure. I organize my photos in folders like “year event” or “year month”. That actually made everything else easier. See below.
The film roll view of the collections doesn’t show where the folder is on disk (it does in the module header but that’s only after you selected a film roll). The naming convention I started makes it easy to pick a film roll.
In the import module, I DO NOT use the recursive directory toggle. I think this can help with your organization. See below.
I don’t know if this came OOTB or if I stumbled on it. But my export target storage is this
$(FILE_FOLDER)/darktable_exported/$(FILE_NAME)
Basically, it keeps the exports separate from the source files. And as long as you don’t use recursion, darktable won’t know about them. But on your storage, the relationship is obvious because it’s a sub folder.
So you can take advantage of this and put your panorama source files under your main folder. Again, don’t use recursion. When you export from your panorama stitcher, put the output one folder above. So you import the stitched panorama into darktable, but not the individual tiles.
It’s not just stitched panoramas and HDRs (which are TIFFs with corresponding “ready-to-use” JPGs in the JPG subfolder too).
The problem is that with my folder structure “YEAR\MONTH\DATE_JOBNAME” for the master files and under that subfolders JPG and others from CaptureOne for example (and I’m not going to change that because too much of my workflow is related to it), I can’t just deselect recursion because then I will have to add thousands of folders manually one by one …
I liked how I could work with CaptureOne in session mode. No import, just browse to the folder you want to work on at that moment. Much simpler.
I could even start it from another application with an image or folder as the parameter and CaptureOne would open on that folder.
This may or may not be something you could consider. I use variables in a preset when I export.
As a result, I have and or end up with two parallel folder structures that are identical.
I have one called Photos and one called PhotoEdits with identical subdirectories, so PhotoEdits mirrors the source folder.
The variables will allow you when exporting to have DT export and or create the same folder that will be named as it is currently set for the source image(s) and folder names.
So you end up with a folder tree named PhotoEdits that has all your jpgs in it and you have your source folder with any array of images that you want but not intersperced with the jpg’s. This can easily be added and viewed separately in DT or any other viewer…
I could share that if you think that might be a solution
That would be a solution if I didn’t already have > 190 000 images in tens of thousands of folders in a given structure. Changing that existing structure would be very disruptive and might have unforseeable side effects in my workflow.
NP just checking…if they are organized in the source folders for the most part could you not move all the jpg subfolders to an new parallel mirrored folder set??
I did this so that looking at the jpg would be easy from any other app and would have the same order and structure as my source files…
For you with that scale I guess maybe not what you want…
I may be well of the mark but I have never used DTs “Import” function. Merely select a folder in ‘File manager of choice’ and then select open with DT. All folders are created and named by RPD. Apologies if I have missed the point. If your jpeg folders have a unique common name factor then a recursive shell script should be able to move them to a different folder tree.
Edit : the forum does not like angled brackets
Another possibility could be a lua script, if you don’t mind to write some code. There is already a delivered standard script that allows to add additional filters to the import dialog.
Here is the Lua documentation for darktable:
I haven’t tested this, but from the description you may be able to determine the folder of an image and reject it from the import.
@wpferguson Do you have experience with this option?
Just one other thought I think you can use the new multiple library feature in 5.4 so you could do an import and pick your top level folder and go only 1 level deep, I think, Its been a while since I imported a large number of files in folders on my hardrive, but this would leave all your files as is and I think when you use this library it would have only your “source” images…so the only burden is a second library which could become your new working library if all goes well on your import??
EDIT,
Nope I thought you could specify the level of the recursive selection but I think it goes as deep as the subfolders do still there might be a way to leverage the multiple workspace databases…
OMG, that’s exactly what I want! I was so focussed on solving the problem inside DT thatI never thought about that …
NP just checking…if they are organized in the source folders for the most part could you not move all the jpg subfolders to an new parallel mirrored folder set??
I did this so that looking at the jpg would be easy from any other app and would have the same order and structure as my source files…
For you with that scale I guess maybe not what you want…
That would completely disrupt my workflow and cause a lot of additional load on my photo database application to manage versions, etc. As it is now, it just has to look one level under the image folder to find JPG versions of the files. Otherwise it would have to look through the whole database.
@deekay : Thanks for the tip, but the “open with DT” solution is perfect for me.
Now, if I could find out how to start it from a bash script …
Put the path to darktable with any arguments in a file and make it executable
I played with import filters long ago. IIRC you get the list of images darktable is going to import and you can filter that down to what you want imported. I’m not sure what it does with a recursive import. If there is a path, then you could filter on that. But you still only filter what you want imported to a single destination.
There is a lua-script, transfer_hierarchy.lua that lets you move trees and parts of trees around while keeping the database in sync.
… the path to darktable…
That’s where I’m already lost … Simple thing in Windows, but I can’t figure it out in Kubuntu …
Searched for darktable executables on the whole disk and found some, but none would start darktable.
The properties in the start menu didn’t geive me anything that seems to work either.
How do I run this from a command line or script???
All I get is this:

