I would like to hide the .url extensions in all folders, without hiding all extensions. I have the preference "Hide the .lnk extension for shortcuts" turned on. The .url extension is also a shortcut. I see that the ability to hide .url extensions has been requested for many years. Is there a way to hide a specific extension for all folders?
You could use a custom column that removes the .url
extension.
function OnInit(initData) {
initData.name = 'Name2';
initData.version = '2023-03-25';
initData.copyright = '';
initData.url = 'https://resource.dopus.com/t/how-to-hide-the-url-extension-in-all-folders/44021';
initData.desc = '';
initData.default_enable = true;
initData.min_version = '12.0';
}
function OnAddColumns(addColData) {
var col = addColData.AddColumn();
col.name = 'Name2';
col.method = 'OnColumn';
}
function OnColumn(scriptColData) {
var item = scriptColData.item;
scriptColData.value = item.ext.toLowerCase() == '.url' ? item.name_stem : item.name;
}
Save ColumnName2.js.txt to
%appdata%\GPSoftware\Directory Opus\Script AddIns
and toggle the column with
Set COLUMNSTOGGLE="scp:Name2/Name2(!,a,0)"
We have plans to make Opus hide .URL extensions automatically, as well as any others flagged in the registry to always be hidden. (With an option to not hide them, for people who don't like it or worry it might obscure the true extension of something.)
At the moment it's only done for the .LNK extension.