Hi there, hope I posted in the right category.
I need to compare two characteristics of the same file for a long list of files (not a comparison of two file lists), for example creation date vs last modified date (or metadata fields - Date taken vs date digitized for ex) and find for which files they are different. Is this possible? thx
Doing this with a script column is probably the best way. You could have Yes/No columns indicating if different pairs of timestamps were equal for each file.
i sure hoped it wouldn't involve scripts, since i'm not a programmer. Thank you anyway, I'll try to learn to use them.
Here's a quick script to get you started:
function OnInit(initData) {
initData.name = 'Compare Fields';
initData.version = '1.0';
initData.url = 'https://resource.dopus.com/t/comparison-between-fields-of-the-same-file/34778';
initData.desc = '';
initData.default_enable = true;
var col = initData.AddColumn();
col.method = 'OnCompare';
col.name = 'Equal';
col.label = 'Compare Fields';
col.header = 'Equal?';
col.justify = 'left';
col.autogroup = true;
}
function OnCompare(scriptColData) {
var field1 = scriptColData.item.create;
var field2 = scriptColData.item.modify;
// var field1 = scriptColData.item.metadata.image.datetaken;
// var field2 = scriptColData.item.metadata.image.datedigitized;
scriptColData.value = field1 - field2 == 0 ? 'yes' : 'no';
}
ColumnCompareFields.js.txt (818 Bytes)
3 Likes
Thanks a bunch, that's awesome!