Scripting question / possible bug

Hello,

First can I just say what a wonderful program Directory Opus is. I've yet to find another that's both as powerful and as easy to use and visually appealing.

What I want to do is the following. I have a list of files named, for instance, "MASH 1x01 Pilot.avi", "MASH 1x02 To Market To Market.avi" and so on. I would like to have DOpus programatically write the file's name into its Title metadata field.

Accordingly, I've read through the documentation, fired up the CLI and came up with:

SetATTR META title:{file$|noext}

This works wonderfully--does exactly what I want, in fact--if a single file is selected. BUT, if multiple files are selected, it writes the same metadata everywhere, namely the metadata of the first selected file. In fact, it writes the name of the first selected file according to the lister's sort column. If I sort by file size, for instance, then the name of the smallest file selected is what will get written.

So. If I'm a noob and doing it wrong, please let me know. I've searched the documentation for a "currently selected" field but couldn't find anything. If it's an issue with the program, please fix. :slight_smile:

Again, love the software. Keep up the good work.

See the example here for one way to do it:

Not sure if it still needs to be run via dopusrt but it shouldn't hurt to keep that part, and may turn out to be needed.

Whoa. Talk about a prompt response. :slight_smile:

Worked perfectly, thank you leo. May I ask why this happens?

By default, if you don't specify a file for the command to work on then it works on all selected files, applying whatever you told it to do to all those files.

In other words, using a filename to specify what a tag should contain isn't the same as telling the command which files to work on.