Duplicate photos

Any questions? Need some help?
Post Reply
ShedDweller
Posts: 13
Joined: 01 Jun 2017, 17:46

Duplicate photos

Post by ShedDweller »

Re the Presets tips page
rednoah wrote: 03 Dec 2015, 17:36 Presets allow you to add customized buttons to FileBot so you can automatically select certain files and match them against a given database with predefined options, and save you a lot of click work.

...

[6]Rename photos and use Date-Taken and Camera Model as the new filename:

Code: Select all

{dt.format('yyyy-MM-dd HH∶mm∶ss')} [{camera.model}]
Image
Is there any way to append the newly created date based filename with a -1 or_2 or something similar if a duplicate is created?

Thanks for any assistance you can suggest.
User avatar
rednoah
The Source
Posts: 22986
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Duplicate photos

Post by rednoah »

1.
No, because in this case a "duplicate" is defined by your format so it can't be known in the format. You can use bindings such as {i} to add a running number though, or {crc32} to add a unique checksum for the file, or add milliseconds to make it more unique, or some identifying exif data, or keep some information from the original filename, etc.


2.
How did you take multiple photos within the same second on the same camera? Would adding milliseconds to the format resolve the issue? You could also take bits and pieces from the original filename (which presumably already has the numbers you want) to make the new filename unique.



EDIT:

Custom duplicate logic is possible, but tricky, so it wouldn't recommend it.

e.g. Get photo index per day:

Code: Select all

model.findAll{ it.d == d }.object.indexOf(object)
:idea: Please read the FAQ and How to Request Help.
ShedDweller
Posts: 13
Joined: 01 Jun 2017, 17:46

Re: Duplicate photos

Post by ShedDweller »

Very sorry to take a month to come back to you, thanks so much for your suggestions.

I opted to actually take some time and clean up the photo collection!! ended up using a little dupicate cleaner called dupeGuru and you don't care..!! anyway...

Now that I'm about to use filebot to sort them all out I come across a weird situation where - dt.format - pulls the modified date rather than the "Origin" "Date Taken"

Am I using the wrong option?
User avatar
rednoah
The Source
Posts: 22986
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Duplicate photos

Post by rednoah »

Please use the MediaInfo Inspector and copy & paste all the Image metadata so I can have a look at what's what.

e.g.

Code: Select all

Exif_IFD0_Date_Time	2012:05:11 13:04:27
Exif_SubIFD_Date_Time_Original	2012:05:11 13:04:27
Exif_SubIFD_Date_Time_Digitized	2012:05:11 13:04:27
AFAIK, FileBot derives the value for {dt} from Exif_IFD0_Date_Time.
:idea: Please read the FAQ and How to Request Help.
ShedDweller
Posts: 13
Joined: 01 Jun 2017, 17:46

Re: Duplicate photos

Post by ShedDweller »

For this example
Exif_IFD0_Date_Time 2011:04:25 09:35:55

The correct timestamp is these:
Exif_SubIFD_Date_Time_Original 2009:05:22 16:00:26
Exif_SubIFD_Date_Time_Digitized 2009:05:22 16:00:26

Now, my photo library has been moved, organised and re-saved, backed-up, restored lost and restored again, many times over the years, so if this is some quirk of that I apologise.

--
MediaInfo - Image
--

Code: Select all

Format	JPEG
Format_Commercial	JPEG
InternetMediaType	image/jpeg
Codec	JPEG
Codec/String	JPEG
Width	1944
Width/String	1 944 pixels
Height	2896
Height/String	2 896 pixels
ColorSpace	YUV
Resolution	8
Resolution/String	8 bits
BitDepth	8
BitDepth/String	8 bits
Compression_Mode	Lossy
Compression_Mode/String	Lossy
StreamSize	411195
StreamSize/String	402 KiB (100%)
StreamSize/String1	402 KiB
StreamSize/String2	402 KiB
StreamSize/String3	402 KiB
StreamSize/String4	401.6 KiB
StreamSize/String5	402 KiB (100%)
StreamSize_Proportion	1.00000
Exif_IFD0_Make	NIKON CORPORATION
Exif_IFD0_Model	NIKON D40X
Exif_IFD0_Orientation	Top, left side (Horizontal / normal)
Exif_IFD0_X_Resolution	300 dots per inch
Exif_IFD0_Y_Resolution	300 dots per inch
Exif_IFD0_Resolution_Unit	Inch
Exif_IFD0_Software	Microsoft Windows Photo Viewer 6.1.7600.16385
Exif_IFD0_Date_Time	2011:04:25 09:35:55
Exif_IFD0_YCbCr_Positioning	Datum point
Exif_IFD0_Padding	[2060 values]
Exif_SubIFD_Exposure_Time	1/80 sec
Exif_SubIFD_F_Number	f/5.6
Exif_SubIFD_Exposure_Program	Manual control
Exif_SubIFD_ISO_Speed_Ratings	400
Exif_SubIFD_Version	2.21
Exif_SubIFD_Date_Time_Original	2009:05:22 16:00:26
Exif_SubIFD_Date_Time_Digitized	2009:05:22 16:00:26
Exif_SubIFD_Components_Configuration	YCbCr
Exif_SubIFD_Compressed_Bits_Per_Pixel	1 bit/pixel
Exif_SubIFD_Exposure_Bias_Value	0 EV
Exif_SubIFD_Max_Aperture_Value	f/5.7
Exif_SubIFD_Metering_Mode	Multi-segment
Exif_SubIFD_White_Balance	Unknown
Exif_SubIFD_Flash	Flash did not fire
Exif_SubIFD_Focal_Length	55 mm
Exif_SubIFD_Sub_Sec_Time	30
Exif_SubIFD_Sub_Sec_Time_Original	30
Exif_SubIFD_Sub_Sec_Time_Digitized	30
Exif_SubIFD_FlashPix_Version	1.00
Exif_SubIFD_Color_Space	sRGB
Exif_SubIFD_Image_Width	1944 pixels
Exif_SubIFD_Image_Height	2896 pixels
Exif_SubIFD_Sensing_Method	One-chip color area sensor
Exif_SubIFD_File_Source	Digital Still Camera (DSC)
Exif_SubIFD_Scene_Type	Directly photographed image
Exif_SubIFD_CFA_Pattern	[Green,Blue][Red,Green]
Exif_SubIFD_Custom_Rendered	Normal process
Exif_SubIFD_Exposure_Mode	Manual exposure
Exif_SubIFD_White_Balance_Mode	Auto white balance
Exif_SubIFD_Digital_Zoom_Ratio	1
Exif_SubIFD_Focal_Length_35	82 mm
Exif_SubIFD_Scene_Capture_Type	Standard
Exif_SubIFD_Gain_Control	Low gain up
Exif_SubIFD_Contrast	None
Exif_SubIFD_Saturation	None
Exif_SubIFD_Sharpness	None
Exif_SubIFD_Subject_Distance_Range	Unknown
Exif_SubIFD_Padding	[2060 values]
Exif_SubIFD_Unknown_tag_0xea1d	4142
Nikon_Makernote_Firmware_Version	2.10
Nikon_Makernote_ISO	0 400
Nikon_Makernote_Color_Mode	COLOR
Nikon_Makernote_Quality_File_Format	BASIC  
Nikon_Makernote_White_Balance	AUTO        
Nikon_Makernote_Sharpening	AUTO  
Nikon_Makernote_AF_Type	AF-A  
Nikon_Makernote_Flash_Sync_Mode	NORMAL      
Nikon_Makernote_Auto_Flash_Mode	                   
Nikon_Makernote_White_Balance_Fine	0
Nikon_Makernote_White_Balance_RB_Coefficients	491/256 318/256 256/256 256/256
Nikon_Makernote_Program_Shift	0 EV
Nikon_Makernote_Exposure_Difference	-4.25 EV
Nikon_Makernote_Preview_IFD	2694
Nikon_Makernote_Auto_Flash_Compensation	0 EV
Nikon_Makernote_Image_Boundary	0 0 2896 1944
Nikon_Makernote_Flash_Exposure_Compensation	0 EV
Nikon_Makernote_Crop_High_Speed	0 3904 2616 3904 2616 0 0
Nikon_Makernote_Camera_Serial_Number	7430668
Nikon_Makernote_Color_Space	sRGB
Nikon_Makernote_VR_Info	48 49 48 48 2 0 0 0
Nikon_Makernote_Tone_Compensation	AUTO    
Nikon_Makernote_Lens_Type	AF, D, G
Nikon_Makernote_Lens	18-55mm f/3.5-5.6
Nikon_Makernote_Flash_Used	Flash Not Used
Nikon_Makernote_AF_Focus_Position	Unknown (1 0 0 1)
Nikon_Makernote_Shooting_Mode	Continuous
Nikon_Makernote_Unknown_20	2
Nikon_Makernote_Lens_Stops	5.33 EV
Nikon_Makernote_Colour_Mode	MODE3a  
Nikon_Makernote_Light_source	NATURAL    
Nikon_Makernote_Shot_Info	[1157 values]
Nikon_Makernote_Camera_Hue_Adjustment	0 degrees
Nikon_Makernote_Noise_Reduction	OFF 
Nikon_Makernote_Color_Balance	[556 values]
Nikon_Makernote_Lens_Data	[32 values]
Nikon_Makernote_Sensor_Pixel_Size	605/100 605/100
Nikon_Makernote_Retouch_History	0 0 0 0 0 0 0 0 0 0
Nikon_Makernote_Image_Data_Size	367059
Nikon_Makernote_Unknown_27	0
Nikon_Makernote_Exposure_Sequence_Number	7990
Nikon_Makernote_Flash_Info	[21 values]
Nikon_Makernote_Image_Optimisation	NORMAL         
Nikon_Makernote_Saturation	AUTO           
Nikon_Makernote_Digital_Vari_Program	               
Nikon_Makernote_Multi_Exposure	48 49 48 48 0 0 0 0 0 0 0 0 0 0 0 0
Nikon_Makernote_High_ISO_Noise_Reduction	Off
Exif_Thumbnail_Compression	JPEG (old-style)
Exif_Thumbnail_X_Resolution	96 dots per inch
Exif_Thumbnail_Y_Resolution	96 dots per inch
Exif_Thumbnail_Resolution_Unit	Inch
Exif_Thumbnail_Offset	31384 bytes
Exif_Thumbnail_Length	4007 bytes
User avatar
rednoah
The Source
Posts: 22986
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Duplicate photos

Post by rednoah »

That is strange indeed. I suppose some photo editing application modified the exif data when modifying the image. I'm not an EXIF expert, but it feels wrong to me. Tools shouldn't modify EXIF metadata as if it was the Last-Modified file attribute.

If this is a common issue, then I'll see if it makes sense to change the default behaviour.

In the meanwhile, you can just pick that piece of information you want in your custom format:

Code: Select all

{exif.DateTimeOriginal}
:idea: Please read the FAQ and How to Request Help.
ShedDweller
Posts: 13
Joined: 01 Jun 2017, 17:46

Re: Duplicate photos

Post by ShedDweller »

Thanks for taking a look

just to confirm, in the expression should i set it as: {exif.DateTimeOriginal('yyyy-MM-dd HH∶mm∶ss')}
User avatar
rednoah
The Source
Posts: 22986
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Duplicate photos

Post by rednoah »

You'd have to parse the String to a Date object, and then convert the Date object back to a String using your custom date format:

Code: Select all

Date.parse('yyyy:MM:dd HH:mm:ss', exif.DateTimeOriginal).format('yyyy-MM-dd HH∶mm∶ss')
:idea: Please read the FAQ and How to Request Help.
ShedDweller
Posts: 13
Joined: 01 Jun 2017, 17:46

Re: Duplicate photos

Post by ShedDweller »

Thanks

That's perfect, another satisfied customer!

Windows store upgrade today.
User avatar
rednoah
The Source
Posts: 22986
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Duplicate photos

Post by rednoah »

You're welcome. Writing up with "advanced" format expressions is what I'm here for. ;)
:idea: Please read the FAQ and How to Request Help.
Post Reply