newbie: compare contents of two folders and highlight discrepancies?

I found the script below in the archives but I’m not sure how it’s supposed to work… or maybe it just isn’t doing exactly what I need it to do.

I process large quantities of images and sometimes there are discrepancies between the number of original files and the ones I processed. I would like a quick way of finding and highlighting the files that weren’t processed. Could a third folder be set up to house the ones that aren’t in both folders?

Thanks very much.


set fold1 to choose folder with prompt "Choose first folder to compare."
set fold2 to choose folder with prompt "Choose second folder to compare."
tell application "Finder"
	--switch the folder, if  fold1 contains a greater number of files than fold2
	if (number of files of folder fold1) > (number of files of folder fold2) then tell fold1 to set {fold1, fold2} to {fold2, it}
	set label index of (files of fold2 whose name is not in (get name of files of fold1)) to 5
end tell

You need to give more information What is the script doing when you run it? What isn’t the script doing that you want it to do?

Yes. Where would you like it to be located? What name? Do you want the files to be moved to this folder or do you want copies placed in this folder?

And any other details you can tell us…

Hi Jennifer,

I think something like this is what you want if you can tell a file was processed or not just by its name.

set f1 to (choose folder)
set f2 to (choose folder)
tell application "Finder"
	set f3 to (make new folder at desktop with properties {name:"Not Processed"})
	set folder_list to (name of every file of f1)
	move (every file of folder f2 where name of it is not in folder_list) to f3
	set folder_list to (name of every file of f2)
	move (every file of folder f1 where name of it is not in folder_list) to f3
end tell


Wow! Thank you so much. How cool, it worked perfectly and did just what I wanted.