XYplorer File Tags Sort Order?

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
Enternal
Posts: 1174
Joined: 10 Jan 2012 18:26

XYplorer File Tags Sort Order?

Post by Enternal » 21 May 2016 14:10

How does the XYplorer File Tags database actually work? Over the month, there seems to be some major issues with the database which caused me to have multiple duplicates of folders (some of them have 5x duplicated lines) and a huge chunk of my tagged files and folders were gone. Fortunately I saved weekly backup of the tag database. I tried copying lines from the old recovered database files into my current database files as a way to merge the missing data with my current database. However I found very weird and troubling behaviors that I don't understand. For example:
2016-05-21 04_37_00-O__ - XYplorer ### 30-day Trial Version ### - 16.80.png
2016-05-21 04_37_00-O__ - XYplorer ### 30-day Trial Version ### - 16.80.png (38.1 KiB) Viewed 1158 times
This is on the O drive with the tag database contents (I will call this TAG_OLD_DB):

Code: Select all

XYplorer File Tags v3

Labels:
Red||FC7268;Orange||F6AB46;Yellow||EFDC4A;Green||B5D74A;Blue||5DA4FE;Purple||E29CDC;Grey||B5B5B5

Extra Tags:
|0|0|0|||||
|0|0|0|||||
|0|0|0|||||
|0|0|0|||||
|0|0|0|||||

Data:
O:\Test1|3|||||||
O:\Test2|3|||||||
O:\Downloads\What.zip|5|||||||
O:\Downloads\The.rar|5|||||||
O:\Downloads\Hell.7z|5|||||||
The folders are not highlighted with the yellow label at all. Changing the database file content ordering (calling it TAG_NEW_DB) to:

Code: Select all

XYplorer File Tags v3

Labels:
Red||FC7268;Orange||F6AB46;Yellow||EFDC4A;Green||B5D74A;Blue||5DA4FE;Purple||E29CDC;Grey||B5B5B5

Extra Tags:
|0|0|0|||||
|0|0|0|||||
|0|0|0|||||
|0|0|0|||||
|0|0|0|||||

Data:
O:\Downloads\Hell.7z|5|||||||
O:\Downloads\The.rar|5|||||||
O:\Downloads\What.zip|5|||||||
O:\Test1|3|||||||
O:\Test2|3|||||||
however works as shown:
2016-05-21 04_37_07-O__ - XYplorer ### 30-day Trial Version ### - 16.80.png
2016-05-21 04_37_07-O__ - XYplorer ### 30-day Trial Version ### - 16.80.png (38.55 KiB) Viewed 1158 times
However, if I deleted any of the line below the folders such as What.zip, The.rar, or Hell.7z in TAG_OLD_DB, the folders are highlighted as expected. On the other hand, the database contents does not matter at all if I make the same folder structure on a different drive such as E (and changed the path from O to E accordingly). Seriously that makes no sense at all.

Any clue?

And this is only one of the problems I encountered that stumps me. Another is when XYplorer is removing duplicate tagged items, it actually removed a bunch of tagged items that were unique. Totally confused.

highend
Posts: 9267
Joined: 06 Feb 2011 00:33

Re: XYplorer File Tags Sort Order?

Post by highend » 21 May 2016 14:51

Your tag.dat file doesn't have the correct sorting. What happens if you do it via:
"Options | Database Check..." in Configuration | Information | Tags. Are the entries resorted correctly (binary ascending sort order (A < B ... < a < b ...)) afterwards?
One of my scripts helped you out? Please donate via Paypal or paypal_donate (at) stdmail (dot) de

Enternal
Posts: 1174
Joined: 10 Jan 2012 18:26

Re: XYplorer File Tags Sort Order?

Post by Enternal » 21 May 2016 21:06

Ah! So it's what I thought it was. So it wasn't just simply ascending alphabetical order but rather ascending binary order. I could not use the Database Check however because of the "bad" sorting of current database file. It keep removing a lot of "duplicates" that are not actual duplicates. What I did instead was:
1. Configuration > Tags > Options > Edit Tagged Items...
2. Toggle the Edit Mode (F6) button to be in text editing mode
3. Select all and Cut
4. Toggle the Edit Mode (F6) button again (basically it's the same as Clear List except I still saved everything in my clipboard
5. DO NOT close this dialog because otherwise I would not be able to get back to this dialog unless I have at least a tagged item
6. Toggle the Edit Mode (F6) button again
7. Paste the clipboard back in
8. Toggle the Edit Mode (F6) button for the final time

By doing those steps above, XYplorer will once again resort every line correctly. This method is better than the Database Check method as it's non-destructive (so it still keeps all your zombies and duplicates if you have them) so that you can put all the items back in correct order before actually fixing the database such as remove/edit zombies and removing duplicates.

Anyway I still need to figure out how did my tagged items suddenly disappeared and in place, replaced with 5x+ duplicates of the same items. :veryconfused:

On a somewhat related note, Don, don't you think the contents of TagsList in the XYplorer config files would be better saved in the tags database itself?

admin
Site Admin
Posts: 49467
Joined: 22 May 2004 16:48
Location: Cologne, Win 8.1, Win 10
Contact:

Re: XYplorer File Tags Sort Order?

Post by admin » 22 May 2016 08:27

Enternal wrote:Ah! So it's what I thought it was. So it wasn't just simply ascending alphabetical order but rather ascending binary order. I could not use the Database Check however because of the "bad" sorting of current database file. It keep removing a lot of "duplicates" that are not actual duplicates.
:? Dupes are two identical items. What are "not actual duplicates"?
Enternal wrote:On a somewhat related note, Don, don't you think the contents of TagsList in the XYplorer config files would be better saved in the tags database itself?
IMO no. TagsList is just a MRU list. It's independent of the actually tagged items.
FAQ | XY News RSS | XY Twitter | Stay home! 🎸 Or wear a mask! 😷

Enternal
Posts: 1174
Joined: 10 Jan 2012 18:26

Re: XYplorer File Tags Sort Order?

Post by Enternal » 22 May 2016 09:24

admin wrote:
Enternal wrote:Ah! So it's what I thought it was. So it wasn't just simply ascending alphabetical order but rather ascending binary order. I could not use the Database Check however because of the "bad" sorting of current database file. It keep removing a lot of "duplicates" that are not actual duplicates.
:? Dupes are two identical items. What are "not actual duplicates"?
Enternal wrote:On a somewhat related note, Don, don't you think the contents of TagsList in the XYplorer config files would be better saved in the tags database itself?
IMO no. TagsList is just a MRU list. It's independent of the actually tagged items.
What I mean is it removed files that are not duplicate and are actually unique. That's exactly what I mean. Basically the files are unique and there are only one of them are in the database yet XYplorer marked it as duplicates and end up removing them. I started with 213 tagged items and then ran the Database Check which removed 1 orphaned file and then proceed to remove 25 of my files from the list saying they're duplicates.

It's not really a problem though because once I have XYplorer properly sort the list using the method I wrote above, it worked as expected. After the database is sorted, I ran it through the Database Check and it removed 1 orphaned file and did not find any duplicates files giving me a total of 212 tagged items which is what I expected.

Post Reply