Deleted label

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
serendipity
Posts: 3360
Joined: 07 May 2007 18:14
Location: NJ/NY

Deleted label

Post by serendipity »

I had 11 labels and labeled some of my items as the 11th label which was chocolate color.
Somewhere along i happened to delete few labels in config>tags section including the 11th one and now my label column for the items labeled chocolate color show as text "011".
This is nice because I know that I deleted a label but there are still items tagged with 011 label.
Is this an intended feature I happen to discover or just a side effect?
Plus I am able to search my orphans from find files labels by entering 011.
Nice!

Update: I guess if you delete orphaned tags this won't work anymore.
Can there be an improvement in the config>tags section where each label shows how many items are labeled? That way I know when not to delete a label.

admin
Site Admin
Posts: 66366
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Deleted label

Post by admin »

1. Intended. Deleting a label does not unlabel files.

2. You can simply do a search lbl:?* and count. :)

serendipity
Posts: 3360
Joined: 07 May 2007 18:14
Location: NJ/NY

Re: Deleted label

Post by serendipity »

admin wrote: 2. You can simply do a search lbl:?* and count. :)
Thanks for the motivation, i got my own tag counter :P :

Code: Select all

//TagCounter
//Count Labels, Comments or Tags.
"Label"
  global $lookup, $lookup2;
  $lookup=Label;
  $lookup2=lbl;
  sub "_getcount";

"Comment"
  global $lookup, $lookup2;
  $lookup=Comment;
  $lookup2=cmt;
  sub "_getcount";

"Tags"
  global $lookup, $lookup2;
  $lookup=Tags;
  $lookup2=tags;
  sub "_getcount";

"_getcount"
  global $lookup, $lookup2;
  $tab= tab ("get");
  
  goto "%computer%?$lookup2:?*"; 
  sortby $lookup, a;
  $tags = report ("{$lookup}|"); 
  $tags = formatlist($tags,"ed","|");
  $lblcount= gettoken($tags, "count","|");
  $count=1;
  $report="";
  WHILE($count<=$lblcount){
    $filter=gettoken($tags, $count,"|");
    selfilter $filter,,"$lookup";
    $filtercount=<get countselected>;
    $report= "$report<crlf>$filter=$filtercount";
    $count++;
    }
  filter;
  seltab $tab;
  text formatlist($report,"e","<crlf>");
  
Last edited by serendipity on 25 Feb 2012 21:14, edited 1 time in total.

admin
Site Admin
Posts: 66366
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Deleted label

Post by admin »

Hey, nice one! Works fine here after one change to adjust to different systems/locales:

Code: Select all

OLD: goto "Computer?$lookup2:?*"; 
NEW: goto "%computer%?$lookup2:?*";
Or even simpler:

Code: Select all

goto "*?$lookup2:?*";

serendipity
Posts: 3360
Joined: 07 May 2007 18:14
Location: NJ/NY

Re: Deleted label

Post by serendipity »

admin wrote:Hey, nice one! Works fine here after one change to adjust to different systems/locales:

Code: Select all

OLD: goto "Computer?$lookup2:?*"; 
NEW: goto "%computer%?$lookup2:?*";
Or even simpler:

Code: Select all

goto "*?$lookup2:?*";
Oh yes, thanks! fixed.
Updated few things here:
http://www.xyplorer.com/xyfc/viewtopic. ... 988#p69988

Post Reply