Automatically Adding To a Collection

I have heavy duty needs with collections but not a lot of experience with commands.

When I highlight a group of folders and click a button I want Opus to go through the list of folders and any time there is a text file in one of the directories I want it to add the file to a specific collection.

Example:

addme-photos.txt (add to collection Photos)
addme-albums.txt (add to collection albums)
addme-video.txt (add to collection video)
and so on...

If the folder is already in the collection I want it to ignore it and keep going.

The idea is to make a simple way to add to collections after adding new folders.

NOTE: The reason I need a script is because all of my folders are not organized for easy drag and drop. For example some music is mp3's in a single fashion and some are albums. I want the presence of a text file to indicate that it is an album.

Please help me brainstorm how I can do this. I'm hoping a resident expert can point me in the right direction.

If you can't think of how to do it this way, I'm open to other suggestions to speed this along.

I'm not sure exactly what you're trying to do. You mention folders and adding folders to collections but then give a list of files and talk about adding the files to collections.

Can you rephrase or give a full example of what you want to do?

Here's what I'm envisioning:

I want to have a button that when I click it it copies a file from my desktop to a folder marking it for entry into collections later.

Then I highlight a bunch of folders and click another button at it makes sure that all of the directories that have the marked file in it are added to the appropriate collection.

So I have a toolbar that has these buttons:

PHOTOS | ALBUMS | MOVIES | UPDATE

As I sort through them I click the button after reviewing it's contents to appropriately mark it. When I do a file named addme-photos.txt or addme.albums.txt gets added to the directory.

Now for the magic:
After awhile I want to make sure that my collections are accurate, so I highlight a bunch of directories that I have been working with as of late and click the UPDATE button.

Opus goes through each directory and if it finds a addme-photos.txt it makes sure it is in the PHOTOS collection.

If it finds a addme.albums.txt it makes sure that the directory is in the ALBUMS collection.

The benefit of this is that if I move files around due to space considerations I can just clear the collections and run the process again. I also don't have to manually figure out what files need to go what collection. The presence of a tiny (1k) empty text file will remember it for me.

I hope this makes sense. I would appreciate any advice you can offer.

There's no way to do that using Opus itself but you could do it using a scripting language (e.g. VBScript or JScript).

You can call Opus commands from outside of Opus using "dopusrt.exe /cmd " and the commands for adding files to collections are listed in this thread:

[Is DOpus right for me?:: user-generated collection xml)

Having the script remove old and invalid items from the collections list could be more difficult since it would have to know what's in the list... The collections are stored in XML files so the script could parse them but I think it would be easier for the "Clean Up" mode of the script to completely delete all the collections and then re-create them.

Thanks Leo. Very helpful.

I have a full blown VB program but I'm thinking that someone here is using something lightweight to do the scripting.

What do you all use for something down and dirty?

C++ or VBScript but I don't think it makes much difference what you use for things like this. Use whatever you know the best. If you're going to parse the XML files then using VB.Net or C#.Net could make life easier as they have XML parsers built-in.