RemoveEmptyColumns

Works like a charm. Maybe a bit slower though. Thanks

Update 2023-12-07

  • Added support for Expandable Folders
1 Like

Update 2025-05-06

  • Adaptation for change in 13.14.10. Don't install if you run an older version.

Edit: beta version removed
CommandRemoveEmptyColumns.js.txt

2 Likes

I'm trying this out but it's not doing anything. If I have something selected or not.
If using it with Set or not. I have empty columns in all the instances I've tried this.
(I'm using the latest beta version).

I have my columns set to add -- if empty. I wonder if that blocks this from working.

What would be good is if the command would remove all empty columns regardless of selection. And if it could execute on folder read too. And allow refresh on changes, so that if an empty column is no longer empty the column would immediately appear.

This ability should be built into the folder format > column options.
Hide Empty Columns

That sounds odd. Try the new version (see next posting and here). It logs a few more things.

I've added the option ALL.

You can run it from an event-triggered script.

It's a command. It doesn't run on its own. It doesn't monitor changes.

Nonetheless, a Hide-if-empty checkbox for a column sounds like a good feature.

1 Like

Update 2025-05-08

  • Adaptation for Opus 13.15.
  • Added option ALL. Analyzes the entire tab, disregarding the current selection.
  • Added option DRYRUN. Logs the computed Set COLUMNSREMOVE command instead of executing it.
  • No changes for the Opus 12 version.
2 Likes

Ok it's working now. And the ALL is working too.
I'll try to figure out an auto execute for my downloads folder.

Check it out. Two apps that the devs added version info. In this downloads folder I have like ten empty columns as an info net to capture potentially important info; because each file type group has their own version of things like "author" , "publisher" etc.

Pushing this hide empty button and the version data jumped from obscurity (off screen horizontally) to right infront of me. That's exactly what I was looking for, thank you.
Hide Empty

But now if I download anything else with different data, it won't refresh and show me that info; it's a static display. Refreshing doesn't do it either. I have to open a new downloads tab.

Oh, I know what to do. On the button the first thing it will do is add all those columns by naming them manually, then in the next line I will put your code. Then I just push the button whenever I download stuff.

Set COLUMNSADD author(1+createddate),companyname(2+createddate),copyright(3+createddate),creator(4+createdate),producer(5+createddate),mp3artist(6+createdate),software(7+createddate),owner(8+createddate),publisher(9+createddate),mp3albumartist(10+createddate),composers(11+createddate),conductors(12+createddate),mp3drm(13+createddate)
RemoveEmptyColumns ALL