Conditional delete

Hello there, I have noticed a number of singles albums in my collection and I have decided I don't want them.

I would imagine it is possible to run an action to deal with this?

I need to check if total number of tracks is equal or less than three and if so, delete _DIRECTORY. Even if the program cannot count total number of tracks, surely it could check for the highest track number within each folder to produce the same effect?

No it can't.
THis would mean that the property folder of one file would have to be compared with another file's property.
And, as you know, Mp3tag does not compare data between files.

You could create an export that sorts by folder, counts the tracks in that folder and then outputs some kind of batch job for the command shell to delete the files.

Or you could renumber all the files and include the total number in the track number and then delete manually all the files that have a trailing 3 (or less).

@sheepdisease This will not recognize the second disc (of a two or more disc album) with only a few tracks.

If you don't have a tag inside your files like "releasetype" you can't be sure it is an EP, a Single or a 1-hour-MixTape or something else.
IMHO "total number of tracks is equal or less than three" is not accurate enough to delete files.

Between your responses you have come up with possible ways of dealing with this task. If it were necessary to include the total number in the track number then so be it, this could then be undone once the job was complete to revert back to %track% %title% afterwards.

For the music I have it is not possible for there to be multi-discs with anything less than 5 tracks so I really am not worried about that, although I am open to input on this concerning practical code implementation. I am making sure that 'part of set' has the correct data so this could be used in checking.

Still hoping this can be implemented somehow, I have a number of folders to test it on.

I think there are already a number of ideas in this post:

I don't know if you have realised: there is no action that deletes files.
So you would have to treat the files yourself probably with a filter.
I do not know, though, what this means:

Are we talking about filenames?
I thought, you would sort by directory, use the function Extras>Track numbering wizard, and set more or less all options to "on",
The you filter for
%track% MATCHES "/[1|2|3]$"
You can now either select these files and press Ctrl-Del to delete them
or you use an action of the type "Format value" for _DIRECTORY with a fixed string as format string, e.g.
Format string: d:\obsolete
This moves all folders to just this single one and you only have to delete that folder.
You can follow this line now or wait until the MP3tag concept gets modified and an action to delete files and folders is implemented.