Using IF statement in export

Hi Guys

I use the following export for FLAC files:
$replace(%artist%, ,,&,Og,Æ,Ae,æ,ae,Å,Aa,å,aa,Ø,Oe,ø,oe,'',,'(',-,')',,'[',-,']',,é,e,´,,!,,',',,)-$replace(%album%, ,,&,Og,Æ,Ae,æ,ae,Å,Aa,å,aa,Ø,Oe,ø,oe,'',,'(',-,')',,'[',-,']',,é,e,´,,!,,',',,EP,-EP,--EP,-EP,)-%_tag%-%year%.nfo

The following action for MP3 files:
$replace(%artist%, ,,&,Og,Æ,Ae,æ,ae,Å,Aa,å,aa,Ø,Oe,ø,oe,'',,'(',-,')',,'[',-,']',,é,e,´,,!,,',',,)-$replace(%album%, ,,&,Og,Æ,Ae,æ,ae,Å,Aa,å,aa,Ø,Oe,ø,oe,'',,'(',-,')',,'[',-,']',,é,e,´,,!,,',',,_EP,-EP,)-MP3-%year%.nfo

Now, I have to choose manuelly which action to perform. Is it possible to use the IF statement

Say:
$ifgreater($strstr(%_TAG%),FLAC,yes,no)" IS yes
then
USE FLAC OPTION

If NO
USE MP3 option

Do you want to declare the target filename of the output textfile, ...
which you create by the Mp3tag export feature, ...
which is usually done by the export function $filename, ...
depending on the filename extension of the currently examined media file, ...
in order to create multiple export files at once ...
on a bunch of given files having different filetypes?

This is not possible.

DD.20170703.1500.CEST

There is a repeated syntax error within your usage of the function $replace().
The last comma before the closing round bracket is a syntax error and should not consolidate in your habit.

DD.20170703.1513.CEST

Thank you :slight_smile:

I'll try explain better (English is not my native)

I have folders containing either FLAC files og MP3 files, but never mixed in 1 folder.

I right-click a folder and open it with Mp3tag.

Then: look this picture:

https://ibb.co/jYsoea

  1. If FLAC: I export a .nfo file, .sfv file and m3u file. (Alle with above code for filenaming.)
  2. If MP3: I export a .nfo file, .sfv file and m3u file. (Alle with above code for filenaming.)
  3. If FLAC: Renaming folder with the use of _TAG
  4. If MP3: Renaming folder but without _TAG, since I cant get it to write MP3, like I can with FLAC.

https://ibb.co/fHTiCv - This is my actions in 1 go.

What I am looking for is a way to combine 1 + 2 and 3 + 4 i the first picture.

So if the folder contains flac files, it will rename accordingly and if MP3 then the same.

All this comes from 1 problem.
When I use _TAG in the filename, it works just fine when it is FLAC files. But when it is MP3 it dosnt write MP3 but ID3v2.3 - and I dont want that.

I am trying to understand what you are doing, ... in the meantime you may try this ...

$replace(%_tag%,
'ID3v1 ID3v2.4','MP3',
'ID3v1 ID3v2.3','MP3',
'ID3v2.4','MP3',
'ID3v2.3','MP3',
'ID3v1','MP3',
'FLAC','FLAC',
'APEv2','APE',
'MP4','MP4')

(as one line)

DD.20170703.2055.CEST

Ofc. Thank you!

Why didnt I see that. I can show you what I am doing, if you sent me PM :slight_smile: