I don't think there is a good way to do that, at least not one which would scale to a large number of folders (which I presume is the case or you wouldn't need to automate it).
Yes I have a large number of folders. Some have MP3's some have Wav etc. I was looking for a way to mass set a custom folder for all those folders that contain high quality Wav files or Low quality MP3's
I did find a somewhat quicker method.. but not ideal.
I am copying the desktop.ini file into each of the folders that have MP3's.
while this is not automated it is saving me from having to open dialogs.
I wonder, why you don't reorganize all your music files under one single directory then. That way you could much better achieve, what you want, assuming you want to set
specific columns or views. Then you could make all sub dirs inherit the settings from your main directory.
I think Daroc's method (or something similar) is the most likely candidate to get what you want. And you may not even need to bother removing duplicate lines from a text file. Though if you have a predictable file naming convention for all your files - such as every folder containing a track "01" or similar, maybe instead search for something like 01.mp3. This way, you only end up with a single search result for each folder containing mp3's? In any case, once you've got the list of mp3's in the Find Results collection, you can just highlight all the files found by your search and run a command like:
Clipboard COPYNAMES=path
...to get the folder path of each found file into the clipboard. From there, you could paste the text to any arbitrary text file, then run a command like:
dopusrt /col import /clear /create "Folders" {f}
...against the text file. This will import all of the folders you found with whatever mp3 files you searched for into a new File Collection called "Folders". You can then perform whatever operations you want against the folders from that collection.
About handling duplicate entries: When you run the dopusrt /col import command against the text file with all of the folder paths from the Clipboard COPYNAMES=path command, Opus either just silently overwrites the already added folder upon reading each subsequent duplicate path entry in the text file, or maybe it's just skipping it. Either way, from a quick test - you DO NOT end up with the same folder being added more than once to the File Collection. So maybe you don't even need to worry about removing duplicate paths one way or another, either by tweaking your search criteria OR processing the text file to remove dupe paths...
Not as elegant as if you could just do a search for folder containing a specified filetype or other search pattern. But would get you where you want with a few extra clicks?
Removing duplicate lines is much easier than you think. I put "pasting", "notepad++" (which is freeware) and "removing duplicates" in one line on purpose. There's no need to make it complicated by involving collections (for anything other than searching for mp3/wav files) into that.
...Fair enough, and I'm personally not intimidated at all by needing to remove duplicate lines. But I'm puzzled why you think a method using file collections adds complexity. Particularly since Search operations inherently involve the use of file collections . Either way - the reason I made the suggestions I did was based on this comment from the OP:
...which indicates he doesn't want a text file with folder names in and of itself, or to necessarily only apply folder format changes.
So with respect, while you're criticizing my suggestion as being unnecessarily complicated simply by recommending the use of file collections - you're suggesting he use an external app, run a macro or regex against the clipboard text to clean up dupes, potentially manually edit internal Opus format definition files and then possibly exit and restart Opus? Ok............
What I suggested was simply another alternative... in this case, a method that groups the folders he's interested in into a collection so that he can perform a variety of whatever operations he wants against those folders directly in the lister. With some minor modifications to the commands I listed above (maybe to adjust the name of the temp collection, as well as add a 'Go col://Folders' command to the second button or something)... once he's performed his search, he's 1 mouse click, a <Ctrl+V> keystroke, then another mouse click away from being able to do whatever he wants to the folders he's interested in. But again, it's an option... so let's let the OP decide what his preference is while GPsoft hopefully considers extending our built-in search options to accommodate this sort of use-case (which, I might add... if accommodated - would indeed result in a list of folders ending up in a ....... Find Results collection ). And if your method is what he thinks best suits his needs, then great! You helped him do something he otherwise couldn't do - and I'll be happy for both of you and not bother trying to convince him to use my way because I think it's less complicated than yours .
If you'd care to explain why my suggestion is "more" complicated than using third-party text editors, setting up a remove dupe line macro or regex, editing .OFF files, and then restarting Opus - then by all means, PM me and we can debate !