illustrate
Products            Buy            Support Forum            Registrations            About           
 

Naming Rules - Need Help with Script

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Starrcade

    • Feb 2026
    • 11

    #1

    Naming Rules - Need Help with Script

    I am trying to set up a naming script for ripping CDs and need help from an expert, please. I tried asking 3 different AI systems (chatgpt, copilot, and gemini) for help, but they keep fighting with each other telling me only their script will work.

    Here is what I want:

    I will have 4 main folders: Albums, Soundtracks, Compilations, and Singles.


    Albums will be: Artist / Year - Album / Track - Title

    Singles will be: Singles / Artist / Year - Album / Track - Title

    Soundtracks (single‑artist) will be: Soundtracks / Album (Year) / Track - Title

    Soundtracks (multi‑artist) will be: Soundtracks / Album (Year) / Track - Artist - Title

    Compilations will be: Compilations / Album (Year) / Track - Artist - Title

    Multi‑disc will put the disc's songs in separate folders for Disc 1, Disc 2, etc.


    There are 2 types of soundtracks. Some soundtracks are made by one artist; I want these to only have the song titles. Other soundtracks have multiple artists (such as Saturday Night Fever). I want these to have artist - title (similar to compilations, except I want soundtracks to be in the Soundtracks folder).


    All 3 AI systems agree that:
    - the album artist = "Various Artists" will automatically know to put the album in Compilations folder.
    - for soundtracks, I can use the Genre Category drop-down and select "Soundtrack" and the script will put the album in the Soundtracks folder.
    - I can have "Various Artists" and the "Soundtrack" genre put the album in the Soundtracks folder with artist - title.
    - for singles, I can (1) Click "Add New Tag" (2) Type: Album Type (3) Set the value to: Single (and the script will put the album in the Singles folder.


    Copilot wrote a script. I asked both ChatGPT and Google Gemini to double check it before I use it, and both said the script had errors and won't work. Each one wrote a new script. I double checked each new script with the other 2 AI chats, and they say the scripts have errors and write me a new script. I double check all the new scripts and it is a never-ending loop where all of the scripts have problems. Here are some errors AI gives me when it reviews some of the scripts:
    - the logic order is wrong
    - the brackets are wrong, or the brackets are invalid, or ending brackets are wrong
    - commas will not work, or commas in the wrong place
    - dBpoweramp does NOT support [IF]tag,==,value,... syntax
    - You cannot nest IF blocks inside the “true” section without closing them
    - The Soundtrack logic is malformed
    - The IFCOMP block is not properly closed before the ELSE
    - unclosed IF blocks
    - overlapping conditions
    - syntax issues
    - can't use semi-colons, or they are in the place
    - one says I need line breaks, and the other says I can't have line breaks and the script needs to be one continuous string of code.


    I will be ripping several hundred CDs and want to make sure I have a perfect and valid script. Please help!


    Below are some examples of scripts I was given from all 3 AI chats:


    Copilot:

    => Version 1:

    Code:
    [IFVALUE]albumtype,Single,
    Singles
    
    \[album artist]
    
    \[year] - [album]
    
    \[IFMULTI]Disc [disc]
    
    \[ENDMULTI][track] - [title]
    ][IFVALUE]genre,Soundtrack,
    [IFVALUE]album artist,Various Artists,
    Soundtracks
    
    \[album] ([year])
    
    \[IFMULTI]Disc [disc]
    
    \[ENDMULTI][track] - [artist] - [title]
    ,
    Soundtracks
    
    \[album] ([year])
    
    \[IFMULTI]Disc [disc]
    
    \[ENDMULTI][track] - [title]
    ]
    ][IFCOMP,
    Compilations
    
    \[album] ([year])
    
    \[IFMULTI]Disc [disc]
    
    \[ENDMULTI][track] - [artist] - [title]
    ,
    Albums
    
    \[album artist]
    
    \[year] - [album]
    
    \[IFMULTI]Disc [disc]
    
    \[ENDMULTI][track] - [title]
    ]
    => Version 2:

    Code:
    [IFVALUE]albumtype,Single,
    Singles
    
    \[album artist]
    
    \[year] - [album]
    
    \[IFMULTI]Disc [disc]
    
    \[ENDMULTI][track] - [title]
    [ELSE][IFVALUE]genre,Soundtrack,
    [IFVALUE]album artist,Various Artists,
    Soundtracks
    
    \[album] ([year])
    
    \[IFMULTI]Disc [disc]
    
    \[ENDMULTI][track] - [artist] - [title]
    [ELSE]
    Soundtracks
    
    \[album] ([year])
    
    \[IFMULTI]Disc [disc]
    
    \[ENDMULTI][track] - [title]
    []
    [ELSE][IFCOMP]
    Compilations
    
    \[album] ([year])
    
    \[IFMULTI]Disc [disc]
    
    \[ENDMULTI][track] - [artist] - [title]
    [ELSE]
    Albums
    
    \[album artist]
    
    \[year] - [album]
    
    \[IFMULTI]Disc [disc]
    
    \[ENDMULTI][track] - [title]
    []
    []

    ChatGPT:

    => Version 1:

    Code:
    ; Soundtracks - Various Artists (like compilations)
    [IFVALUE]genre,Soundtrack,[IFVALUE]album artist,Various Artists,Soundtracks\
    [album] ([year])\
    [IFMULTI]Disc [disc]\[ENDMULTI]
    [track] - [artist] - [title]
    
    [IFVALUE]genre,Soundtrack,Soundtracks\
    [album] ([year])\
    [IFMULTI]Disc [disc]\[ENDMULTI]
    [track] - [title]
    
    [IFVALUE]albumtype,Single,Singles\
    [album artist]\
    [year] - [album]\
    [IFMULTI]Disc [disc]\[ENDMULTI]
    [track] - [title]
    
    [IFCOMP]Compilations\
    [album] ([year])\
    [IFMULTI]Disc [disc]\[ENDMULTI]
    [track] - [artist] - [title]
    
    [IFNOTVALUE]genre,Soundtrack,Albums\
    [album artist]\
    [year] - [album]\
    [IFMULTI]Disc [disc]\[ENDMULTI]
    [track] - [title]
    => Version 2:

    Code:
    [IFVALUE]albumtype,Single,Singles\
    [album artist]\
    [year] - [album]\
    [IFMULTI]Disc [disc]\[ENDMULTI]
    [track] - [title]
    
    [IFVALUE]genre,Soundtrack,[IFVALUE]album artist,Various Artists,Soundtracks\
    [album] ([year])\
    [IFMULTI]Disc [disc]\[ENDMULTI]
    [track] - [artist] - [title]
    
    [IFVALUE]genre,Soundtrack,Soundtracks\
    [album] ([year])\
    [IFMULTI]Disc [disc]\[ENDMULTI]
    [track] - [title]
    
    [IFCOMP]Compilations\
    [album] ([year])\
    [IFMULTI]Disc [disc]\[ENDMULTI]
    [track] - [artist] - [title]
    
    [IFNOTVALUE]genre,Soundtrack,Albums\
    [album artist]\
    [year] - [album]\
    [IFMULTI]Disc [disc]\[ENDMULTI]
    [track] - [title]

    Gemini:

    => Version 1:

    Code:
    [IFVALUE]albumtype,Single,Singles\[album artist]\[year] - [album]\[IFMULTI]Disc [disc]\[ENDMULTI][track] - [title],[IFVALUE]genre,Soundtrack,Soundtracks\[album] ([year])\[IFMULTI]Disc [disc]\[ENDMULTI][track][IFVALUE]album artist,Various Artists, - [artist],] - [title],[IFCOMP]Compilations\[album] ([year])\[IFMULTI]Disc [disc]\[ENDMULTI][track] - [artist] - [title],Albums\[album artist]\[year] - [album]\[IFMULTI]Disc [disc]\[ENDMULTI][track] - [title][][][]
    => Version 2:

    Code:
    [IFVALUE]albumtype,Single,Singles\[album artist]\[year] - [album]\[IFMULTI]Disc [disc]\[ENDMULTI][track] - [title],[IFVALUE]genre,Soundtrack,[IFVALUE]album artist,Various Artists,Soundtracks\[album] ([year])\[IFMULTI]Disc [disc]\[ENDMULTI][track] - [artist] - [title],Soundtracks\[album] ([year])\[IFMULTI]Disc [disc]\[ENDMULTI][track] - [title]],[IFCOMP]Compilations\[album] ([year])\[IFMULTI]Disc [disc]\[ENDMULTI][track] - [artist] - [title][ELSE]Albums\[album artist]\[year] - [album]\[IFMULTI]Disc [disc]\[ENDMULTI][track] - [title][][]]
    => Version 3:

    Code:
    [IF]albumtype,==,Single,Singles\[album artist]\[year] - [album]\[IFMULTI]Disc [disc]\[ENDMULTI][track] - [title],[IF]genre,==,Soundtrack,Soundtracks\[album] ([year])\[IFMULTI]Disc [disc]\[ENDMULTI][track][IF]album artist,==,Various Artists, - [artist],] - [title],[IFCOMP]Compilations\[album] ([year])\[IFMULTI]Disc [disc]\[ENDMULTI][track] - [artist] - [title],Albums\[album artist]\[year] - [album]\[IFMULTI]Disc [disc]\[ENDMULTI][track] - [title][ENDIF][]][]


  • garym
    dBpoweramp Supporter
    • Nov 2007
    • 6154

    #2
    Most of the AI generated stuff is AI slop.

    Different approaches can be used and probably can program a giant single script. But I've started with something much simpler. In the CD ripper, have a different PROFILE (top row of the lower left area that has ripping file name settings) for each of these types.

    Singles
    Soundtracks
    All other

    Choose the ripping profile for the type of CD you are ripping. And make sure for any compilation album (something that has various artists), the COMPILATION = yes box is ticked in the top of the ripping screen where it is showing you the artist, title, etc.

    Play with these a little bit for all your options and let us know your thoughts, desired changes. Would be good to get them nailed as separate ripping profiles before trying to combine.

    The "path" row for all of these would be the same -- your top "parent" music folder. Like: C:\Music

    For the "Singles" profile, name it Singles and use the following naming string:
    [MAXLENGTH]240,Singles\[artist]\[year] - [album]\[track] - [title][]

    For the "Soundtracks" profile, name it Soundtracks and use the following naming string. Works with both various artists and single artists
    [MAXLENGTH]240,Soundtracks\[IFCOMP][album] ([year])[IFMULTI]\Disc [disc][]\[track] - [artist] - [title][][IF!COMP]\[album] (year)\[IFMULTI]\Disc [disc][]\[track] - [title][][]

    For the "all other" profile name it All Other and use the following naming string. This will handle compilations, non-compilations, and multidisk automatically:
    [MAXLENGTH]240,[IFCOMP]Compilations\[album] ([year])[IFMULTI]\Disc [disc][]\[track] - [artist] - [title][][IF!COMP][IFVALUE]album artist,[album artist],[artist][]\[year] - [album][IFMULTI]\Disc [disc][]\[track] - [title][][]
    Last edited by garym; Yesterday, 11:28 PM.

    Comment

    • garym
      dBpoweramp Supporter
      • Nov 2007
      • 6154

      #3
      EDITED:

      For the "Singles" profile, name it Singles and use the following naming string:
      [MAXLENGTH]240,Singles\[artist]\[year] - [album]\[track] - [title][]

      For the "Soundtracks" profile, name it Soundtracks and use the following naming string. Works with both various artists and single artists
      [MAXLENGTH]240,Soundtracks\[IFCOMP][album] ([year])[IFMULTI]\Disc [disc][]\[track] - [artist] - [title][][IF!COMP]\[album] ([year])\[IFMULTI]\Disc [disc][]\[track] - [title][][]

      For the "all other" profile name it All Other and use the following naming string. This will handle compilations, non-compilations, and multidisk automatically:
      [MAXLENGTH]240,[IFCOMP]Compilations\[album] ([year])[IFMULTI]\Disc [disc][]\[track] - [artist] - [title][][IF!COMP][IFVALUE]album artist,[album artist],[artist][]\[year] - [album][IFMULTI]\Disc [disc][]\[track] - [title][][]

      Comment

      • Starrcade

        • Feb 2026
        • 11

        #4
        Thank you. Your idea of separate profiles seems like slightly more work with hundreds of CDs, but I can do it. I have some more questions since I have never used the software before:

        (1) What does checking the "Compilations" box do? I tried learning about the software by watching old videos which used old versions and I don't remember seeing the Compilations box (I couldn't find any new videos).

        (2) If I make a Singles profile, will I still have to make an "Album Type" tag and set the value to "Single" when I want the rip to go to the Singles folder? I was told to do that when using the long mega-script.

        (3) Can I change between different profiles as often as I want after I insert my CD?

        Good idea with the max length. AI never brought that up.

        Comment

        • Starrcade

          • Feb 2026
          • 11

          #5
          garym Sorry, I have one more question to add.

          (4) Does the "all other" script know to put the ripped album into the Albums folder (if it isn't a compilation)?

          Comment

          • garym
            dBpoweramp Supporter
            • Nov 2007
            • 6154

            #6
            Originally posted by Starrcade
            garym Sorry, I have one more question to add.

            (4) Does the "all other" script know to put the ripped album into the Albums folder (if it isn't a compilation)?
            all other puts a noncompilation album into an artist folder:

            c:/music/artist/year - album/track - title

            if it is a compilation, it goes into:

            c:/music/Compilations/album (year)/....

            Comment

            • garym
              dBpoweramp Supporter
              • Nov 2007
              • 6154

              #7
              Originally posted by Starrcade
              Thank you. Your idea of separate profiles seems like slightly more work with hundreds of CDs, but I can do it. I have some more questions since I have never used the software before:
              takes about 1 second more to select the profile from dropdown box. Better yet, get a stack of "singles" and rip them one after the other while on the SINGLES profile. Same with Soundtracks.

              Originally posted by Starrcade
              (1) What does checking the "Compilations" box do? I tried learning about the software by watching old videos which used old versions and I don't remember seeing the Compilations box (I couldn't find any new videos).
              It creates a "compilations" tag (on/off) in the tag metadata for each file, telling a program that this album is "various artists". This tag is read by virtually all music server programs and is very common.

              Originally posted by Starrcade
              (2) If I make a Singles profile, will I still have to make an "Album Type" tag and set the value to "Single" when I want the rip to go to the Singles folder? I was told to do that when using the long mega-script.
              No. again, the AI provided scripts were junk.

              Originally posted by Starrcade
              (3) Can I change between different profiles as often as I want after I insert my CD?
              yes

              Comment

              • simbun
                dBpoweramp Supporter
                • Apr 2021
                • 231

                #8
                Originally posted by Starrcade
                (2) If I make a Singles profile, will I still have to make an "Album Type" tag and set the value to "Single" when I want the rip to go to the Singles folder? I was told to do that when using the long mega-script.
                Whilst you won't need "Album Type" to drive the naming rules, you may still want to populate the tag to enrich the browsing experience.
                The "releasetype" tag is typically sourced from MusicBrainz: https://musicbrainz.org/doc/Release_Group/Type

                Most servers recommend an "/AlbumArtist/Album/Tracks" layout, so it might be worth verifying your approach with your server of choice.

                Comment

                • garym
                  dBpoweramp Supporter
                  • Nov 2007
                  • 6154

                  #9
                  Originally posted by simbun
                  so it might be worth verifying your approach with your server of choice.
                  Excellent point. The worst possible approach is to rip 100s of CDs and then load them up into your server/player of choice and to find that it doesn't like something about your tagging or file naming/organization.

                  My advise is to test things out early on. Rip some regular artist CDs, rip some Singles, some soundtracks, some compilations, some multidisk CDs, etc. And then load into your server and see how things are displayed, organized, etc.

                  For example, I'm surprised that with single artist soundtracks, you don't want the ARTIST as a folder. Currently you would have:

                  Soundtracks (single‑artist) will be: Soundtracks / Album (Year) / Track - Title

                  I would prefer Soundtracks / Artist / Album (Year) / Track - Title, so that if I have an artist that has multiple single artist soundtracks, they would be grouped together in an ARTIST subfolder under soundtracks. To do this, my naming string would be:

                  [MAXLENGTH]240,Soundtracks\[IFCOMP][album] ([year])[IFMULTI]\Disc [disc][]\[track] - [artist] - [title][][IF!COMP]\[artist]\[album] ([year])\[IFMULTI]\Disc [disc][]\[track] - [title][][]

                  Comment

                  • garym
                    dBpoweramp Supporter
                    • Nov 2007
                    • 6154

                    #10
                    By the way this naming and folder organization is almost entirely so that we as human beings can look at a folder structure of our music files and make some sense of it. Most modern music servers/players don't care at all about the file name or the folder structure. Rather the important thing is that the metadata tag fields are correct (i.e., ARTIST or ALBUM ARTIST, ALBUM, TITLE, TRACK, etc.). I use Lyrion Music Server (and sometimes Roon and sometimes foobar2000). In all cases it is the metadata tags that provide me with browsing and searching capabilities, NOT the file names/folders.

                    Comment

                    • Starrcade

                      • Feb 2026
                      • 11

                      #11
                      I really appreciate your help. It was a great idea to use the different profiles to give me different naming paths. I will definitely pay attention to the metadata tags.

                      Comment

                      Working...