Use of conditionals

What i want to do is create a button(not in context menu) that only works if the file is a MP3. If the file is not a MP3, don't do anything.
How can I do this?. If the button can be in MS-DOS,better.
Really appreciate your help.

Depends what you want the button to do. Run an external tool on the MP3 file, or run internal Opus commands?

Why don't create a button that selects MP3's (just by extension) before doing whatever you want to do with the files?

Buttons that run SELECT commands then try to do other things don't seem to work reliably.

I wonder if GPSoft might enhance the modifiers to be able to do something like @filesonly:*.mp3 - perhaps with regex support...

They do work for many situations.

As an aside, it's often better to deselect the files you don't want to process (i.e. deselect ~(*.mp3) in this case) rather than select the ones you do want to process. That way the button still works on the file selection and doesn't force you to run its commands on every single matching file in the current folder.

Run an internal command.
What i want is that the button execute a command only from the mp3 files selected, if there is a non mp3 files, don't do anything.
This is because i created a button that adds the cover art to mp3's, but if the button run with a non mp3 file, the file becomes garbage.

Not sure we're talking about the same thing.

Opus doesn't currently have an internal command which adds covers to MP3 files. (Or does it and I've forgotten?)

[quote="leo"]Not sure we're talking about the same thing.

Opus doesn't currently have an internal command which adds covers to MP3 files. (Or does it and I've forgotten?)[/quote]
Yep, my mistake, sorry.
Is an external application.

Try this:

@filesonly Select DESELECT ~(*.mp3) "C:\Program Files\Your\Command.exe" {filepath$}

Seems to work for me, from a quick test.

[quote="leo"]Try this:

@filesonly Select DESELECT ~(*.mp3) "C:\Program Files\Your\Command.exe" {filepath$}

Seems to work for me, from a quick test.[/quote]
Yeah, thanks for the help, but i don't want run the command for all the mp3's, only the selected, and if there's a file selected and is not a mp3, don't do anything with this file.

That's exactly what the command does.