Page 1 of 1

IPC date created

Posted: Sun Sep 22, 2019 9:30 pm
by jams
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?

Re: IPC date created

Posted: Tue Sep 24, 2019 2:15 am
by void
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

Re: IPC date created

Posted: Tue Sep 24, 2019 4:15 pm
by NotNull
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).

Re: IPC date created

Posted: Tue Sep 24, 2019 8:18 pm
by jams
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 :)

Re: IPC date created

Posted: Thu Sep 26, 2019 6:27 am
by void
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

Re: IPC date created

Posted: Thu Sep 26, 2019 7:10 am
by jams
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.