// Special Sort Column function OnInit(initData) { initData.name = "Special Sort Column"; initData.desc = "A column to sort a specific file to the top of the list."; initData.version = "1.0"; initData.default_enable = true; var col = initData.AddColumn(); col.name = "SpecialSort"; col.method = "OnSpecialSort"; col.label = "Special"; col.justify = "left"; col.autogroup = true; col.namerefresh = true; col.autorefresh = false; } function OnSpecialSort(scriptColData) { if (scriptColData.col != "SpecialSort") return; if (scriptColData.item.is_dir) { scriptColData.value = "Dir"; scriptColData.sort = 1; } else { var nameUpper = scriptColData.item.name.toUpperCase(); if (nameUpper == "RESONIC.LNK" || nameUpper == "FOOBAR2000.LNK") { scriptColData.value = scriptColData.item.name_stem; scriptColData.sort = 0; } else { scriptColData.value = "File"; scriptColData.sort = 2; } } }