Looking to format a -printf string to fit to everythings time format

General discussion related to "Everything".
Post Reply
luckulucki
Posts: 45
Joined: Mon Jun 19, 2017 1:45 pm

Looking to format a -printf string to fit to everythings time format

Post by luckulucki »

hello,

I have a script running each night, like

Code: Select all

find /path/ -printf '"%p",%s,\n'
it worked fine since years, because it only took the path and the filesize.

Now, I'd like to change that script to also get the dates of the files/folders.

I have modified the script to add a date, but I'm unsure, what format I need to use, so everything can understand it correctly.

Code: Select all

find /path/ -printf '"%p",%s,%TY-%Tm-%Td %TH:%TM:%TS %Tz\n'
I have only found this post What time format is used in efu-files?, but as far as I understand, I don't want to change the format everything uses, I just want to adapt my script to use the format everything uses.

Can anybody tell me, if possible, how I would format my printf string to fit the format everything uses?

Thank you very much.
(I'm using a 1.5 alpha atm, not the actual, but 01346a, because the newest always crashed)
NotNull
Posts: 5261
Joined: Wed May 24, 2017 9:22 pm

Re: Looking to format a -printf string to fit to everythings time format

Post by NotNull »

Everything supports a couple of date/time formats in EFU files(see the efu_filetime setting).

When using Linux' find command, this should do:

Code: Select all

find.exe -printf '"%p",%s,%TFT%TT,,\n'
Which generates output like

Code: Select all

"./Everything64.exe",4798984,2023-05-26T07:04:38.5761116000,,
(Date Created and Attributes are not available in LInux so those are left blank)


And when saved as an EFU file, Everything will be able to read and understand it, after adding the Filename,Size,Date Modified,Date Created,Attributes header.
void
Developer
Posts: 15352
Joined: Fri Oct 16, 2009 11:31 pm

Re: Looking to format a -printf string to fit to everythings time format

Post by void »

(I'm using a 1.5 alpha atm, not the actual, but 01346a, because the newest always crashed)
Please send me a mini crash dump.
luckulucki
Posts: 45
Joined: Mon Jun 19, 2017 1:45 pm

Re: Looking to format a -printf string to fit to everythings time format

Post by luckulucki »

NotNull wrote: Sun Jun 11, 2023 9:29 pm When using Linux' find command, this should do

Code: Select all

find -printf '"%p",%s,%TFT%TT,,\n'
Which generates output like

Code: Select all

"./Everything64.exe",4798984,2023-05-26T07:04:38.5761116000,,
(Date Created and Attributes are not available in LInux so those are left blank)
Thank you very much! Works like a charm!
void
Developer
Posts: 15352
Joined: Fri Oct 16, 2009 11:31 pm

Re: Looking to format a -printf string to fit to everythings time format

Post by void »

Thank you for the crash dump luckulucki,

The dump shows Everything crashing when saving your reconstructed file list folders to disk.
Everything versions earlier than 1.5.0.1350a can cause database corruption when indexing file lists.

Could you please try rebuilding your index:
With Everything 1.5.0.1350a+
Exit Everything (File -> Exit) -This will likely cause Everything to crash.
Delete your %LOCALAPPDATA%\Everything\Everything-1.5a.db
Restart Everything.

Please let me know if the issue persists.
luckulucki
Posts: 45
Joined: Mon Jun 19, 2017 1:45 pm

Re: Looking to format a -printf string to fit to everythings time format

Post by luckulucki »

void wrote: Wed Jun 14, 2023 12:04 am Please let me know if the issue persists.
I store my Everything-1.5a.db in the everything programs folder, so I just deleted it after exiting everything and deleted the old Everything64.exe too.
I copied the new exe from the Everything-1.5.0.1350a.x64.zip to the programs folder and started it.
Everything starts scanning and indexing and after this done, the Indexing properties starts.
Meanwhile I use the http-server from everything and the normal search window.
After a while, it crashes. I sent you a new minidump.

btw: How can I completely disable the properties indexing? I found no button/option to disable it.
void
Developer
Posts: 15352
Joined: Fri Oct 16, 2009 11:31 pm

Re: Looking to format a -printf string to fit to everythings time format

Post by void »

Thank you for the mini crash dump.

This is the same crash.
Everything is crashing when trying to save the Everything database to disk.

Could you please send your Help->Troubleshooting information to support@voidtools.com


btw: How can I completely disable the properties indexing? I found no button/option to disable it.
Remove all properties from Tools -> Options -> Properties.
Size, Date Modified and other basic file information can be disabled under Tools -> Options -> Indexes.
luckulucki
Posts: 45
Joined: Mon Jun 19, 2017 1:45 pm

Re: Looking to format a -printf string to fit to everythings time format

Post by luckulucki »

void wrote: Thu Jun 15, 2023 11:16 pm Could you please send your Help->Trouble shooting information
Done.

void wrote: Thu Jun 15, 2023 11:16 pm Remove all properties from Tools -> Options -> Properties.
Thanks, but nah. I configured all those properties very careful and time-consuming (the default did not include m4a files or aiff, i.e.).
I don't want to delete them. I just want to disable them.

So when there is no user friendly and easy way to disable the properties indexing, would you consider to plan a nice button/checkbox to just disable/enable the settings the users have spent many time, so they don't have to trash their work just for temporarely disabling that nice feature.
This would be helpful ;-D

Thank you.
void
Developer
Posts: 15352
Joined: Fri Oct 16, 2009 11:31 pm

Re: Looking to format a -printf string to fit to everythings time format

Post by void »

Thank you for the troubleshooting information.

The issue is caused by excluding files/folders from an indexed file list.
I am working on a fix..



I will consider an option to toggle all indexed properties on/off.
Thank you for the suggestion.

For now, please consider another Everything instance with property indexing disabled.
void
Developer
Posts: 15352
Joined: Fri Oct 16, 2009 11:31 pm

Re: Looking to format a -printf string to fit to everythings time format

Post by void »

Everything 1.5.0.1351a fixes a crash when excluding items from file lists.

I highly recommend forcing a rebuild with Everything 1.5.0.1351a if you are indexing file lists.
Previous versions could have caused corruption to your reconstructed filelist folder database.
luckulucki
Posts: 45
Joined: Mon Jun 19, 2017 1:45 pm

Re: Looking to format a -printf string to fit to everythings time format

Post by luckulucki »

Thank you! Seems to not crash anymore. (I deleted the .db file as in my previous post and forced a complete fresh indexing)
Post Reply