IPC date created

Plug-in and third party software discussion.
Post Reply
jams
Posts: 34
Joined: Thu Mar 27, 2014 8:36 am
Contact:

IPC date created

Post by jams » Sun Sep 22, 2019 9:30 pm

Hi David,
I'm facing an issue with "dc" search switch when used with IPC. I have this query:

Code: Select all

ext:jpg;jpeg;png;tif;tiff path:<"E:\Photos\A trier 2\107PHOTO\"> !path:<$Recycle.Bin|C:\WINDOWS|"C:\Program Files"|"C:\Program Files (x86)"> dc:>22/09/2019T23:15:56
which works perfectly fine when used in the client application (no result because files were created in 2015).
But when used in my application (a windows service running its own "Everything.exe -startup" process) the result of this query is the same as when I do not provide the "date created" switch.

For your information
  • The Everything.exe file run by the service is located at a different place that the one I use to check with the client.
  • in the Everything.ini file I have set the following:

    Code: Select all

    date_format=dd/MM/yyyy
    time_format=HH:mm:ss
    index_date_created=1
    fast_date_created_sort=1
    
I tried to use the console but could not see anything useful.
Do you have any clue on what could explain this behavior, or how I could debug it?

void
Site Admin
Posts: 5459
Joined: Fri Oct 16, 2009 11:31 pm

Re: IPC date created

Post by void » Tue Sep 24, 2019 2:15 am

Please try running Everything in Debug Mode.

What is shown in the debug console when you perform your IPC query?

In Green text, you should see something like:

Code: Select all

search 'ext:jpg;jpeg;png;tif;tiff path:<"E:\Photos\A trier 2\107PHOTO\"> !path:<$Recycle.Bin|C:\WINDOWS|"C:\Program Files"|"C:\Program Files (x86)"> dc:>22/09/2019T23:15:56' filter '' sort 0

NotNull
Posts: 2109
Joined: Wed May 24, 2017 9:22 pm

Re: IPC date created

Post by NotNull » Tue Sep 24, 2019 4:15 pm

If you use this for your photo application, make Windows and Program Files folders variable by using shell folders instead of hard paths. Example shell:windows (not everyone has Windows installed in C:\Windows).

jams
Posts: 34
Joined: Thu Mar 27, 2014 8:36 am
Contact:

Re: IPC date created

Post by jams » Tue Sep 24, 2019 8:18 pm

Thanks for your replies !
@void
  • The problem is that my windows service runs in isolated session 0, which does not allow UI. Anyway using -debug-log was ok (see the attachment).
  • I've been investigating further and used the service as "daemon" which allows me to run it in the user session (as admin).
  • It turned out that in this context the results are good. I mean specifying the date created returns no result as expected (without the date created I've got the expected count).
  • As it's the same code that is executed in both cases I guess that it has something to do with the service. I'll try to create a minimum repro project.
@NotNull
Thanks for the advice, but what you see in the query is already the translation of C# environment variables :)
You do not have the required permissions to view the files attached to this post.

void
Site Admin
Posts: 5459
Joined: Fri Oct 16, 2009 11:31 pm

Re: IPC date created

Post by void » Thu Sep 26, 2019 6:27 am

Thanks for the debug log.

The debug log shows Everything is receiving the correct search.
There is a search OP-code emitted for the indexed date created filter.

Does the following search work:

ext:jpg;jpeg;png;tif;tiff path:<"E:\Photos\A trier 2\107PHOTO\"> !path:<$Recycle.Bin|C:\WINDOWS|"C:\Program Files"|"C:\Program Files (x86)"> dc:>20190922T23:15:56

Note the order of year / month / day.
Everything might be using a different dd/mm/yyyy or yyyy/mm/dd order depending on the process' user profile.

The correct order for ISO-8601is always YYYYMMDDTHHMMSS

jams
Posts: 34
Joined: Thu Mar 27, 2014 8:36 am
Contact:

Re: IPC date created

Post by jams » Thu Sep 26, 2019 7:10 am

You nailed it !
Thanks a lot for finding the solution so quickly, just for people who might face the same issue, in C# I had to format the date this way: "yyyyMMddTHH:mm:ss". I wonder if the date and time format specified in the Everything.ini file only relates to displayed dates in the client?

Thanks a lot.

Post Reply