Download this and drop it into the list in Preferences / Toolbars / Scripts:
- HasFolderArt.js.txt (1.2 KB)
(For more detail on installing it: How to use buttons and scripts from this forum )
You can then use it like this:
Script code for reference:
// Called by Directory Opus to initialize the script
function OnInit(initData)
{
initData.name = "HasFolderArt";
initData.version = "1.0";
initData.copyright = "(c) 2018 Leo Davidson";
initData.url = "https://resource.dopus.com/t/this-type-of-search-possible/28558";
initData.desc = "Adds a column that says if a folder contains a FolderArt.xmv file, which can be used for searching.";
initData.default_enable = true;
initData.min_version = "12.0";
var col = initData.AddColumn();
col.name = "HasFolderArt";
col.method = "OnHasFolderArt";
col.label = "Has Folder Art";
col.justify = "left";
col.autogroup = true;
col.match.push_back("Yes");
col.match.push_back("No");
}
// Implement the HasFolderArt column
function OnHasFolderArt(scriptColData)
{
if (!scriptColData.item.is_dir)
{
scriptColData.value = "";
return;
}
if (DOpus.FSUtil.Exists(scriptColData.item.realpath + "\\FolderArt.xmv"))
{
scriptColData.value = "Yes";
}
else
{
scriptColData.value = "No";
}
}