Code: Select all
//doesn't remove last existing tag
$a = report("{tags}<crlf>", 1);
$b = inputselect("Select Tags to Remove.<crlf> Tags will be removed from the selected File or Folder", $a,", ",2);
tag "$b", ,1,2;Code: Select all
//doesn't remove last existing tag
$a = report("{tags}<crlf>", 1);
$b = inputselect("Select Tags to Remove.<crlf> Tags will be removed from the selected File or Folder", $a,", ",2);
tag "$b", ,1,2;Code: Select all
//doesn't remove last existing tag
$a = report("{tags}", 1);
$b = inputselect("Select Tags to Remove.<crlf> Tags will be removed from the selected File or Folder", $a,", ",2);
tag "$b", ,1,2;It doesn't seem ok. Try this instead:Marco wrote:Try this![]()
Code: Select all
//doesn't remove last existing tag $a = report("{tags}", 1); $b = inputselect("Select Tags to Remove.<crlf> Tags will be removed from the selected File or Folder", $a,", ",2); tag "$b", ,1,2;
Code: Select all
//tag remove
$b = inputselect("Select Tags to Remove.<crlf> Tags will be removed from the selected File or Folder", formatlist(report("{tags}, ", 1),"eds",", "),", ",2);
if $b != "" {tag "$b", ,1,2};I can confirm that it works.LittleBiG wrote:It doesn't seem ok...
I have 3 files with 3 different tags. (1 file - 1 tag). Your script concatenates my 3 tags, then gives me 1 choice to remove.Marco wrote:I can confirm that it works.LittleBiG wrote:It doesn't seem ok...
You're doing it wrong, the script is intended to work on a single file/folder.LittleBiG wrote:I have 3 files with 3 different tags. (1 file - 1 tag). Your script concatenates my 3 tags, then gives me 1 choice to remove.
...a script that will list the tags of the selected item in an inputselect window...
Code: Select all
...Tags will be removed from the selected File or Folder...
Code: Select all
"Remove inputselect Tags recursively|:tagsrmv"
end(getinfo("CountSelected") < 1), "At least one item must be selected!";
$lstF = get(selecteditemspathnames);
$a = inputselect("Select Tags to Remove.<crlf> Tags will be removed recursively (selected files, folders and folder contents).", formatlist(report("{tags}, ", 1),"eds",", "),", ",2);
foreach ($tkF, $lstF, "<crlf>") {
tag "$a", "$tkF", 1, 2;
$lst = folderreport("items", "r", $tkF, "r");
foreach ($tk, $lst, "<crlf>") {
tag "$a", "$tk", 1, 2;
}
tag "$a", "$tkF", 1, 2;
}Code: Select all
"Remove inputselect Tags recursively|:tagsrmv"
end(getinfo("CountSelected") < 1), "At least one item must be selected!";
$lstF = get("selecteditemspathnames", "|");
$tagLst = "";
$filesLst = "";
foreach($item, $lstF, "|") {
if(exists($item) == 2) {
$tags = folderreport("files:{tags}", "r", $item, "r", , "|");
$files = folderreport("files", "r", $item, "r", , "|");
} else {
$tags = report("{tags}", $item);
$files = $item;
}
$tagLst = $tagLst . $tags . "|";
$filesLst = $filesLst . $files . "|";
}
$tagLst = replace($tagLst, ",", "|");
$tagLst = formatlist($tagLst, "edst", "|"); // Clean the tag list
$a = inputselect("Select Tags to Remove.<crlf> Tags will be removed recursively (selected files, folders and folder contents).", $tagLst, "|" , 2);
tag "$a", $filesLst, 1, 2;
Code: Select all
$tags = report("{tags}", $item) . "|" . folderreport("items:{tags}", "r", $item, "r", , "|");
$files = $item . "|" . folderreport("items", "r", $item, "r", , "|");