Code: Select all
$items = get("ItemsPathNames", "<crlf>", "a");
$paper = "";
foreach ($item, $items, <crlf>) {
if (!regexmatches($item, "^.*zip$|^.*rar$|^.*7z$")) {continue}
$text = regexreplace($item, "(^.*).zip|.rar|.7z$", "$1");
$text = regexreplace($text, "(^.*)\([0-9]{1,3}\)", "$1");
$match = formatlist($items, "f", <crlf>, "$text<crlf>$text*");
if (gettoken($match, 2, <crlf>)) {$paper .= $match . <crlf>}
}
$paper = formatlist($paper, "sd", <crlf>);
paperfolder("Similar item name", $paper, <crlf>, "nl");
//goto(lax('vi:$paper //"Similar item name"'));
sortbylist $paper