{file} code isn't working?

There is some files:

I'm selecting them all, and execute this command:
SetAttr META comment:<{file}>

The output:

What's wrong with {file} code? I need to copy a filename of each file to its description/comment "field".

I'm using Opus 12.6 (evatuation)

That would set all 5 files' descriptions to the first file's name.

To do what you wanted, use this:

dopusrt /acmd SetAttr {filepath} META comment:{file}
1 Like

dopusrt /acmd SetAttr {filepath} META comment:<{file}> is working for filenames, but why is there a quote "?

The quote was already included in your example.

Use this:

@nofilenamequoting 
dopusrt /acmd SetAttr "{filepath}" META "comment:<{file}>"

The automatic quoting may do unexpected things if the quotes end up next to > or < characters as they are used for redirection. Manual quoting allows you to be explicit about exactly what is wanted.