Page 1 of 1

XYplorer File Tags Sort Order?

Posted: 21 May 2016 14:10
by Enternal
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 2206 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 2206 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.

Re: XYplorer File Tags Sort Order?

Posted: 21 May 2016 14:51
by highend
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?

Re: XYplorer File Tags Sort Order?

Posted: 21 May 2016 21:06
by Enternal
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?

Re: XYplorer File Tags Sort Order?

Posted: 22 May 2016 08:27
by admin
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.

Re: XYplorer File Tags Sort Order?

Posted: 22 May 2016 09:24
by Enternal
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.