Yes, but this would involve a custom condition (as there is a decision to make at run time, i.e. check for the presence of a matching raw, and only move the file if this is the case).
You could create a rule that moves only JPEGs to a subfolder of your choice using a "file type" condition set to JPEG, and a move action. This will move all JPEG files indiscriminately.
Next, add a second condition, namely a Custom Condition and test the "File.Extensions" variable, to see if, say, a CR2 is associated with the JPEG at hand.
The move action will only execute if both conditions are met, achieving what you want.
The Custom condition will basically consist in a 1-line JavaScript function, that will test the "File.Extensions" variable and return a Boolean True or False depending on what is found in it. The function gives its thumbs up by returning True.
The following is just from the top of my head and was NOT tested, but it should be enough to get you started.
- Code: Select all
// Returns true if there is a Canon CR2 raw file in the current image stack.
function Evaluate(context)
{
return context("File.Extensions").indexOf("cr2") >= 0 ? 1 : 0;
}
Save the above code to a file, say "HasCR2.js" and use it as your custom condition. The above function may require some minor tweaks but the idea is there.
There is a couple of sample custom condition written in JavaScript that you will find here on Windows 7 or 8: C:\ProgramData\FastPictureViewer\Scripts\Samples\Condition Scripts, you may want to read those files, in particular the comments in them, this may help you get a feel of what's possible.
Let me (and the rest of us) know how you eventually achieved the result you want, or if you need more assistance with custom conditions!
In a nutshell: if you need a selection criteria that is not available among the 25 existing ones, write your own!
Tip: you could also write a custom
action if desired (but in your case, moving to a subfolder, absolute or relative, is pretty well covered by the built-in Move action already).
OK, that's one way, that will work in general. If you know some specifics about the file names, for example that all JPEG+RAW pairs are always named DSC_XXXX.jpg and DSC_XXXX.cr2, and you other JPEGs follows a distinct naming convention, you can simply use a pattern-matching expression on the file name to pick only the JPEGs you want (or reject the ones you don't want).
This can be done with the build-in Filename Condition (or Exception), very selectively if needed using regular expressions, and is perhaps simpler as you directly exploit knowledge about the file name formats.