Load a file list in its original order (aka: disable sort or custom sort)

Have a suggestion for "Everything"? Please post it here.
Post Reply
nikov
Posts: 128
Joined: Fri Dec 24, 2021 10:31 am

Load a file list in its original order (aka: disable sort or custom sort)

Post by nikov »

Hi,
Many thanks for this great program!

I just want to load a programmatically generated file list in its original order (without any kinds of sorting.).
I have tried it with EFU file list but a loaded EFU file does not preserve its original order (always uses a sort).
Also, opening a file from a loaded EFU file list has no effect on "Run Count".

So, if you could just add an option to load a file list without sorting (i.e. a way to custom sort or disable sort), it would be very useful for viewing files in user preferred custom order.

Many thanks.
void
Developer
Posts: 15533
Joined: Fri Oct 16, 2009 11:31 pm

Re: Load a file list in its original order (aka: disable sort or custom sort)

Post by void »

Thank you for your feedback nikov,

I will look into an option to sort by original order.
Thank you for the suggestion.


For now, consider using Everything 1.5a and using any property column to store the order:

Code: Select all

Filename,size,date modified,date created,attributes,Custom Property 0
c:\folder\example filename.txt,1234,2021-02-14T15:19:05.9099360+10:30,2021-02-14T15:19:05.9099360+10:30,0,1
c:\folder\example filename2.txt,1234,2021-02-14T15:19:05.9099360+10:30,2021-02-14T15:19:05.9099360+10:30,0,2
c:\folder\example filename3.txt,1234,2021-02-14T15:19:05.9099360+10:30,2021-02-14T15:19:05.9099360+10:30,0,3
Then sort by custom property 0



Rename custom property 0
for example: /custom_property_0=EFU order



If you are including this file list in your index, you will need to add Custom Property 0 to your index under Tools -> Options -> Properties.
(Custom Property 0 is automatically indexed if you are just opening the file list from File -> Open File list)
nikov
Posts: 128
Joined: Fri Dec 24, 2021 10:31 am

Re: Load a file list in its original order (aka: disable sort or custom sort)

Post by nikov »

This almost worked but only problem with this way, the "Run Count" is not updated and shown when opening a file from an opened EFU file list (from File -> Open File List).
Adding EFU list in the Index works but due to database rebuild it is very slow compared to just opening the EFU list (from File -> Open File List).
If only opened EFU list supported updating of the "Run Count" that would have been great.
Many thanks for the help.
void
Developer
Posts: 15533
Joined: Fri Oct 16, 2009 11:31 pm

Re: Load a file list in its original order (aka: disable sort or custom sort)

Post by void »

Thank you for your reply nikov,

I have looked into an option to allow opened-file-lists to load/save run history.

Unfortunately, this would conflict with the local index.
Everything only manages one run history database.



Running a new instance might be useful:
Launch Everything with the -instance <instance-name> command line option:

For example:
Everything.exe -instance "File Lists"

Setup your indexes to include only your desired file lists:
  • In Everything, from the Tools menu, click Options.
  • Click the NTFS tab on the left.
  • Uncheck Automatically index new fixed volumes.
  • Uncheck Automatically index new removable volumes.
  • For each NTFS volume:
    • Uncheck Include in database.
  • Click the ReFS tab on the left.
  • Uncheck Automatically index new fixed volumes.
  • Uncheck Automatically index new removable volumes.
  • For each ReFS volume:
    • Uncheck Include in database.
  • Click the File List tab on the left.
  • Click Add....
  • Select your file list and click OK.
  • Click OK.
This instance will have its own settings, database and run history.



Import Run History
Multiple Instances
nikov
Posts: 128
Joined: Fri Dec 24, 2021 10:31 am

Re: Load a file list in its original order (aka: disable sort or custom sort)

Post by nikov »

What I tried to mean:
There is no need to touch the index or database; I just need to see a file list with no sort.
Everything already has such kind of function such as:

filelist:"C:\z_item|C:\y_item|C:\w_item|C:\x_item"

But (depending on the current sort) Everything destroys the filelist's order and displays:
C:\w_item
C:\x_item
C:\y_item
C:\z_item

But I want (the original order):
C:\z_item
C:\y_item
C:\w_item
C:\x_item


The whole problem could have been easily solved if there was a function like:
filelist_no_sort:"C:\z_item|C:\y_item|C:\w_item|C:\x_item"
Or
disable_sort: filelist:"C:\z_item|C:\y_item|C:\w_item|C:\x_item"


Unlike EFU file list, a "filelist:" list is strongly associated with the existing database and run history. But a "filelist:" list does not preserve the original order.
Thus, a "filelist_no_sort:" function would have solved the whole problem.


Then finally, using preprocessor I could load a large list using:
filelist_no_sort:#include:"C:\list.txt"


Thank you for the help.
void
Developer
Posts: 15533
Joined: Fri Oct 16, 2009 11:31 pm

Re: Load a file list in its original order (aka: disable sort or custom sort)

Post by void »

Thank you for your reply nikov,
But (depending on the current sort) Everything destroys the filelist's order and displays:
Correct.
Everything does not keep the original file list order.

Everything results must be sorted at all times for performance reasons.
This means Everything will need to keep the original order in memory.

I have put on my TODO list to add an option to store the original order.
This might work as a 'index original file list order' setting along with a 'original file list order' property.


Specifying the sort order might also be an option, eg:
filelist:"C:\z_item|C:\y_item|C:\w_item|C:\x_item" sort-order:"C:\z_item|C:\y_item|C:\w_item|C:\x_item"
-or-
filelist_no_sort:"C:\z_item|C:\y_item|C:\w_item|C:\x_item"
nikov
Posts: 128
Joined: Fri Dec 24, 2021 10:31 am

Re: Load a file list in its original order (aka: disable sort or custom sort)

Post by nikov »

Thank you for putting this in the TODO list.

If there is an "original file list order" property, then I guess this "original file list order" column will be always updating by reading from an "order_list.csv" file. Because this way, if "order_list.csv" file is updated using an external application, it will be immediately reflected in the Everything result. Thus, this order can be programmatically quickly changeable.
Also, a function to load the "order_list.csv" will also give the ability to quickly change the order.


As a side note, if "order_list.csv" is planned, then people can use this for other purposes as well, by adding not just only "Order" column but other columns in this csv file, such as:

Path, Order, Quality, Author, Rating
"C:\z_item", 1, "Good", "Person B", 4
"C:\y_item", 2, "Bad", "Person A", 1.7
"C:\w_item", 3, "Best", "Person A", 5
"C:\x_item", 4, "Good", "Person E", 2.9


This will be very useful for people with read-only drives. In read-only drives, file properties cannot be modified. In such case, user can store custom properties in this csv file if this csv file supports adding more columns.

Thus, this will not only solve the "original order" problem but will also solve the problem of storing properties elsewhere in case of read-only drives.

(Then, we can call this file "external_properties.csv" instead of "order_list.csv")


Thank you void and happy New Year.
Post Reply