Make a custom property that encompasses two pre-existing properties

Discussion related to "Everything" 1.5 Alpha.
Post Reply
Jesse6
Posts: 4
Joined: Thu Feb 03, 2022 8:16 pm

Make a custom property that encompasses two pre-existing properties

Post by Jesse6 »

I am trying to sort my pictures and videos by the date they were created. For pictures this is the "Date taken" property, for videos this is the "media created" property. Pictures have no "media created" data and videos have no "date taken" data.

A single column that could be used to order all videos and pictures in one go would be really helpful. I renamed the custom property Custom_property_0=DateOriginal. It would be great if this property would list "date taken" information for photos and "media created" info for videos. But I'm not sure where to go from here? Any advice would be greatly appreciated!
raccoon
Posts: 1017
Joined: Thu Oct 18, 2018 1:24 am

Re: Make a custom property that encompasses two pre-existing properties

Post by raccoon »

try this

<regex:tostring:datetaken:(.+)|regex:tostring:mediacreated:(.+)>

Then Add Column -> Search -> Regular Expression Match 0 (or 1)

I have not tested these date-taken and media-created properties, so I hope I have them named correctly.
void
Developer
Posts: 16735
Joined: Fri Oct 16, 2009 11:31 pm

Re: Make a custom property that encompasses two pre-existing properties

Post by void »

As raccoon suggestions, with the following search:


<regex:tostring:datetaken:(.+) | regex:tostring:datemediacreated:(.+)>

Sort with Add Column -> Search -> Regular Expression Match 1



I'll add a mediacreated alias.
(media created is the same as date encoded)
Last edited by void on Fri Feb 04, 2022 11:18 pm, edited 1 time in total.
Reason: added spaces to break | operator
Jesse6
Posts: 4
Joined: Thu Feb 03, 2022 8:16 pm

Re: Make a custom property that encompasses two pre-existing properties

Post by Jesse6 »

Racoon and Void, Thank you both very much for your time. I found that

Code: Select all

<regex:tostring:datetaken:(.+)>|<regex:tostring:datemediacreated:(.+)>
worked by contrast

Code: Select all

<regex:tostring:datetaken:(.+)|regex:tostring:datemediacreated:(.+)> 
seemed to only return photos (.jpg) and not videos (.mov).
Last edited by NotNull on Fri Feb 04, 2022 6:17 pm, edited 1 time in total.
Reason: Added codetags [</>] for clarity.
raccoon
Posts: 1017
Joined: Thu Oct 18, 2018 1:24 am

Re: Make a custom property that encompasses two pre-existing properties

Post by raccoon »

Good find. (bug)

@void: <regex:abc|regex:xyz> only finds "abc" and ignores "xyz". Looks like a parser conflict with pipes touching regex, quoted or unquoted. My intuition is that Everything operators should take precedence exiting the regex, like space does.

works: <<regex:abc>|<regex:xyz>>
doesnt: <regex:abc|regex:xyz>
doesnt: <regex:"abc"|regex:"xyz">

@Jesse6: I also recommend double-wrapping that alternation in another set of angle braces <> so that the pattern will work independent of your global OR>AND; AND>OR operator precedence setting. At least in case other readers intend to use this method.

"E:\Media\" <<regex:tostring:datetaken:(.+)>|<regex:tostring:datemediacreated:(.+)>>
void
Developer
Posts: 16735
Joined: Fri Oct 16, 2009 11:31 pm

Re: Make a custom property that encompasses two pre-existing properties

Post by void »

regex: eats the |

Use spaces to break the search into two terms.

regex:tostring:datetaken:(.+) | regex:tostring:datemediacreated:(.+)



regex:
tuska
Posts: 1052
Joined: Thu Jul 13, 2017 9:14 am

Re: Make a custom property that encompasses two pre-existing properties

Post by tuska »

Hi,
because I think it fits this topic:

Is it possible to compare 2 columns

Code: Select all

- dm:         column "Date Modified"    "value1"
  AND
- datetaken:  column "Date Taken"       "value2"
whether identical data (date and time) are present and
output them in another column, whether there is a difference?

(Ideally, one could include the column "Media Created" (datemediacreated:) at the same time, if possible...).

I am thinking here, for example, of the following:

Code: Select all

#exact:<value1,value2>
Returns 1 if value1 is exactly the same as value2, 0 otherwise.
Example: #exact:abc,abc => 1
Example: #exact:abc,Abc => 0

This would have the advantage, for example, that you could determine which .JPG images
one could subsequently adjust the modification date to the EXIF date.

Unfortunately, my knowledge is far from sufficient for this.
Thanks.
void
Developer
Posts: 16735
Joined: Fri Oct 16, 2009 11:31 pm

Re: Make a custom property that encompasses two pre-existing properties

Post by void »

I am working on solutions to this.
Hopefully, dm:==datetaken:



For now, there is:

eval:#dm:==#datetaken:

which will list files where date modified is the same as date taken.
Please note this search is slow, please use other filters for the best performance.



eval:
tuska
Posts: 1052
Joined: Thu Jul 13, 2017 9:14 am

Re: Make a custom property that encompasses two pre-existing properties

Post by tuska »

2void
I am very pleased that you are working on a solution here.

I have just tried your suggestion and would have expected this query to show the .JPG files,
where the date taken differs from the date modified.

Code: Select all

d: dm:lastweek regex:tostring:datetaken:(.+) | regex:tostring:datemediacreated:(.+) !eval:#dm:==#datetaken:
2022-02-07_eval-dm---datetaken.png
2022-02-07_eval-dm---datetaken.png (37.02 KiB) Viewed 8390 times
 
Unfortunately, this is not the case and I don't know why.

Can you please check.
Thank you!
void
Developer
Posts: 16735
Joined: Fri Oct 16, 2009 11:31 pm

Re: Make a custom property that encompasses two pre-existing properties

Post by void »

The dates are probably out a few milliseconds. (not shown in Everything)

Please try the following to match days:
eval:#dm:/864000000000==#datetaken:/864000000000

and for hours:
eval:#dm:/36000000000==#datetaken:/36000000000

and for minutes:
eval:#dm:/600000000==#datetaken:/600000000

For comparing dates only in the current timezone:
eval:#<:#getyear:<#dm:>==#getyear:<#datetaken:>#>: eval:#<:#month:<#dm:>==#month:<#datetaken:>#>: eval:#<:#day:<#dm:>==#day:<#datetaken:>#>:
Last edited by void on Tue Feb 08, 2022 10:13 am, edited 1 time in total.
Reason: fixed syntax
tuska
Posts: 1052
Joined: Thu Jul 13, 2017 9:14 am

Re: Make a custom property that encompasses two pre-existing properties

Post by tuska »

Thanks!

This is how it looks to me.
 
2022-02-07_2022-02-07_eval-dm----datetaken.png
2022-02-07_2022-02-07_eval-dm----datetaken.png (96.2 KiB) Viewed 8378 times
 
Otherwise I would - at the very end - combine the 3 commands,
i.e. date and time should be compared per image...(and the "date taken" should still be displayed in the column).
void
Developer
Posts: 16735
Joined: Fri Oct 16, 2009 11:31 pm

Re: Make a custom property that encompasses two pre-existing properties

Post by void »

Looks like Everything is not reading the the date taken property for these files correctly.

Could you please send one of these files to support@voidtools.com
tuska
Posts: 1052
Joined: Thu Jul 13, 2017 9:14 am

Re: Make a custom property that encompasses two pre-existing properties

Post by tuska »

void wrote: Mon Feb 07, 2022 10:17 am Could you please send one of these files to support@voidtools.com
Done.

This is what FastStone Image Viewer for windows - Version 7.5 and Total Commander shows ("EXIF: Date/Time" and "Date modified"):
 
2022-02-07_EXIF date-time.png
2022-02-07_EXIF date-time.png (35.59 KiB) Viewed 8370 times
 
tuska
Posts: 1052
Joined: Thu Jul 13, 2017 9:14 am

Re: Make a custom property that encompasses two pre-existing properties

Post by tuska »

2void
I'm sorry, I had unfortunately overlooked that in my settings (properties) only the 'Date Taken' of D:\Bilder\**.jpg was indexed.
The search was, however, carried out in the path: D:\Pictures\2022\. --- ("Bilder" (German) corresponds to "Pictures/Images" in English).

Due to your related hint in an email, I have basically changed my settings to the following, namely
Properties -> Date Taken:

Code: Select all

FROM: D:\Bilder**.jpg
TO:   D:\**.jpg
void (author) wrote:(D:\**.jpg will match any jpg file under the D: drive <where as d:\*.jpg would only match jpg files directly in the root of the D: drive>)
I have tested these variants, which were also mentioned in your emails:

Code: Select all

D:\Pictures\2022\ eval:#dm:/864000000000!=#datetaken:/864000000000	--> days unequal
D:\Pictures\2022\ eval:#dm:/36000000000!=#datetaken:/36000000000	--> hours unequal
D:\Pictures\2022\ eval:#dm:/600000000!=#datetaken:/600000000		--> minutes unequal

Grouping: <days unequal|hours unequal|minutes unequal>
D:\Pictures\2022\ <eval:#dm:/864000000000!=#datetaken:/864000000000|eval:#dm:/36000000000!=#datetaken:/36000000000|eval:#dm:/600000000!=#datetaken:/600000000>
2022-02-08_Properties_Date Taken_EXIF-DateTime_Date modified.png
2022-02-08_Properties_Date Taken_EXIF-DateTime_Date modified.png (59.95 KiB) Viewed 8283 times
 
2022-02-08_Property_Date Taken_D-Pictures-2022.png
2022-02-08_Property_Date Taken_D-Pictures-2022.png (79.04 KiB) Viewed 8283 times
 
This is the final variant for me: eval:#dm:/600000000!=#datetaken:/600000000

Code: Select all

D:\Pictures\2022\  eval:#dm:/600000000!=#datetaken:/600000000
2022-02-09_Date modified NOT EQUAL to Date Taken in minutes (seconds and milliseconds are ignored.png
2022-02-09_Date modified NOT EQUAL to Date Taken in minutes (seconds and milliseconds are ignored.png (42.96 KiB) Viewed 8283 times
 
void (author) wrote:<eval:#dm:/864000000000!=#datetaken:/864000000000|eval:#dm:/36000000000!=#datetaken:/36000000000|eval:#dm:/600000000!=#datetaken:/600000000>
This would be the same as:
eval:#dm:/600000000!=#datetaken:/600000000

Everything is dividing the date-modified and date-taken filetime (100 nanoseconds since 01/01/1601) by 600,000,000
Effectively converting the filetimes to minutes since 01/01/1601.

This should read as:

date-modified in minutes since 01/01/1601
is NOT EQUAL to
date-taken in minutes since 01/01/1601

This will not match files where the number of minutes is the same.
It will match files where the minutes, hours, days, months or years differ.
Seconds and milliseconds will be ignored.
Thank you very much again for your support! :)
tuska
Posts: 1052
Joined: Thu Jul 13, 2017 9:14 am

Re: Make a custom property that encompasses two pre-existing properties

Post by tuska »

Hi,

Code: Select all

dm:thisweek regex:tostring:datetaken:(.+) | regex:tostring:datemediacreated:(.+) 
dm:1.2.2022..11.2.2022 regex:tostring:datetaken:(.+) | regex:tostring:datemediacreated:(.+) 
note: trailing space
I don't understand why these queries only show me .JPG files, but not videos, eg.

Code: Select all

Name/Ext			Size		Date			Attr
VID-20220208-WA0000.mp4		20 436 180	08.02.2022 07:58	-a--
VID-20220209-WA0003.mp4		   953 625	09.02.2022 15:29	-a--
Everything 1.5.0.1300a (x64) - Properties - [x] Include files - [x] Fast Sort

Code: Select all

Date Taken:    D:\**.jpg
Media Created: D:\**.3gp;D:\**.amr;D:\**.asf;D:\**.asx;D:\**.avi;D:\**.flv;D:\**.ifo;D:\**.mkv;D:\**.mov;D:\**.mp4; ...
Can someone please give me a clue.
Thank you!
void
Developer
Posts: 16735
Joined: Fri Oct 16, 2009 11:31 pm

Re: Make a custom property that encompasses two pre-existing properties

Post by void »

If you search for:
VID-20220208-WA0000.mp4

Does Everything show a date for this file in the Media Created column?
tuska
Posts: 1052
Joined: Thu Jul 13, 2017 9:14 am

Re: Make a custom property that encompasses two pre-existing properties

Post by tuska »

void wrote: Fri Feb 11, 2022 10:56 am If you search for:
VID-20220208-WA0000.mp4

Does Everything show a date for this file in the Media Created column?
No.

Thanks for the tip! :)
That explains it for me: There is no "medium created" date for the files mentioned.

I'm sorry that I didn't notice that. :roll:
void
Developer
Posts: 16735
Joined: Fri Oct 16, 2009 11:31 pm

Re: Make a custom property that encompasses two pre-existing properties

Post by void »

Does Everything show a date for the Windows Property System Media created property?
  • In Everything, right click the Media Created column header and click Remove Column.
  • Right click the result list column header and click Add columns....
  • Click Windows Property System on the left.
  • Search for:
    media created
  • Select Media created (System.Media.DateEncoded)
  • Click OK.
  • In Everything, search for:
    VID-20220208-WA0000.mp4
  • Does Everything show a date for this file in the Media created column?
tuska
Posts: 1052
Joined: Thu Jul 13, 2017 9:14 am

Re: Make a custom property that encompasses two pre-existing properties

Post by tuska »

No, this file does not have a media created date and therefore does not show it in the column.

Code: Select all

Windows Property System
Name: Medium erstellt; Type: Property System; Canonical Name: System.Media.DateEncoded  ("German")
Unfortunately, I had mistakenly chosen the wrong time period -> in January I had videos that had a date.
WhatsApp videos very often don't have a "media created" date and I was misled by that (there were several WhatsApp videos in February).
void
Developer
Posts: 16735
Joined: Fri Oct 16, 2009 11:31 pm

Re: Make a custom property that encompasses two pre-existing properties

Post by void »

Everything 1.5.0.1304a adds support for:

dm:==date-taken:
dm:!=date-taken:
tuska
Posts: 1052
Joined: Thu Jul 13, 2017 9:14 am

Re: Make a custom property that encompasses two pre-existing properties

Post by tuska »

Thank you for these new comparison possibilities!

Here are two more pictures - these queries were used:

Code: Select all

D:\Pictures\2022\ eval:#dm:/600000000!=#datetaken:/600000000
D:\Pictures\2022\ dm:!=date-taken:

D:\Pictures\2022\ dm:==date-taken:
 
2022-03-15_dm !=date-taken vs eval #dm 600000000 !=#datetaken 600000000.png
2022-03-15_dm !=date-taken vs eval #dm 600000000 !=#datetaken 600000000.png (101.79 KiB) Viewed 7516 times
 
2022-03-15_dm==date-taken.png
2022-03-15_dm==date-taken.png (34.64 KiB) Viewed 7516 times
void
Developer
Posts: 16735
Joined: Fri Oct 16, 2009 11:31 pm

Re: Make a custom property that encompasses two pre-existing properties

Post by void »

Are you seeing an unexpected result in Everything?

Sorry, I couldn't tell from your screenshots.
tuska
Posts: 1052
Joined: Thu Jul 13, 2017 9:14 am

Re: Make a custom property that encompasses two pre-existing properties

Post by tuska »

void wrote: Wed Mar 16, 2022 6:31 am Are you seeing an unexpected result in Everything?
No, all is fine! :)
I mainly just wanted to show the differences between the two searches in the
image "2022-03-15_dm !=date-taken vs eval #dm 600000000 !=#datetaken 600000000.png".

2022-03-15_dm !=date-taken vs eval #dm 600000000 !=#datetaken 600000000.png
In the image in dark mode (display in Total Commander), all files are listed and a subdivision is drawn.
If you compare these files with the evaluation in Everything you can see that the results are correct.

Code: Select all

1. D:\Pictures\2022\ eval:#dm:/600000000!=#datetaken:/600000000
   ... This will not match files where the number of minutes is the same.
   ... It will match files where the minutes, hours, days, months or years differ.
   ... --> !!! Seconds and milliseconds will be IGNORED. !!! <--
   ...         =========================================

   Result: 3 Pictures

   Name/Ext			Exif-Date Taken (DE)	Date modified
   20220131_183958.jpg		31.01.2022_18.24.57	31.01.2022 18:39:58
   20220131_114035_Kopie1.jpg	31.01.2022_09.40.35	31.01.2022 11:40:35
   20220123_105932.jpg		21.01.2022_08.29.32	23.01.2022 11:42:26

Code: Select all

2. D:\Pictures\2022\ dm:!=date-taken:
   The seconds and milliseconds are also checked here!
   ===================================================   
   Result: 7 Pictures           (All pictures!)

   Name/Ext			Exif-Date Taken (DE)	Date modified
   20220207_091200.jpg		07.02.2022_09.12.00	07.02.2022 09:12:37
   20220206_165139.jpg		06.02.2022_16.51.39	06.02.2022 16:51:40
   20220202_211706.jpg		02.02.2022_21.17.06	02.02.2022 21:17:07
   20220202_130408.jpg		02.02.2022_13.04.08	02.02.2022 13:04:09
   20220131_183958.jpg		31.01.2022_18.24.57	31.01.2022 18:39:58
   20220131_114035_Kopie1.jpg	31.01.2022_09.40.35	31.01.2022 11:40:35
   20220123_105932.jpg		21.01.2022_08.29.32	23.01.2022 11:42:26
2022-03-15_dm==date-taken.png

Code: Select all

D:\Pictures\2022\ dm:==date-taken:
In this image, the modification date was simply changed by me so that a search result was obtained in Everything.

Code: Select all

Name/Ext			Exif-Date Taken (DE)	Date modified
20220206_165139.jpg		06.02.2022_16.51.39	06.02.2022 16:51:40	Original
         Change to:     	06.02.2022_16.51.39 	06.02.2022 16:51:39 !	dm:==date-taken:  -> OK
Thanks again for your endeavours!
Post Reply