diff --git a/doc/forum/Photos__44___raw_and_jpeg__58___drop_jpeg_if_raw_is_available/comment_3_0b336ff312f7cf6bdd58cdd2b7045f4f._comment b/doc/forum/Photos__44___raw_and_jpeg__58___drop_jpeg_if_raw_is_available/comment_3_0b336ff312f7cf6bdd58cdd2b7045f4f._comment new file mode 100644 index 0000000000..50a1dc7f29 --- /dev/null +++ b/doc/forum/Photos__44___raw_and_jpeg__58___drop_jpeg_if_raw_is_available/comment_3_0b336ff312f7cf6bdd58cdd2b7045f4f._comment @@ -0,0 +1,17 @@ +[[!comment format=mdwn + username="CandyAngel" + avatar="http://cdn.libravatar.org/avatar/15c0aade8bec5bf004f939dd73cf9ed8" + subject="comment 3" + date="2018-10-15T12:59:24Z" + content=""" +Hm.. if you want to just drop the JPGs which have known RAW versions, you can set some metadata to say it has a RAW version (again, I'd just set it to the key of the RAW as it makes it easier to get/find later) and then drop JPGs which have that field set. + + git annex metadata -s derived_from_raw=SHA256E-s[...].RAW DCIM_0001.JPG + git annex drop --metadata 'derived_from_raw=*' --include '*.JPG' + +Need to check the `--metadata` matching filter works as intended there.. + +Given your criteria is only \"file in the current directory with the same name, but different extension\", you could script the population of that metadata field. + +This will drop the JPGs where you've indicated it has a RAW even if that RAW isn't present though. I'm not entirely sure what behavior you want.. +"""]]