title
Products            Buy            Support Forum            Professional            About            Codec Central
 

[FRONTFOLDER]string[] and [BACKFOLDER]string[] functions

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mville
    dBpoweramp Guru

    • Dec 2008
    • 4021

    [FRONTFOLDER]string[] and [BACKFOLDER]string[] functions

    In Naming section, I can get [TRIMFIRSTFOLDER]string[] and [TRIMLASTFOLDER]string[] functions to work, but I can't get [FRONTFOLDER]string[] and [BACKFOLDER]string[] to work.

    Has anyone got these functions working and if so, how?
  • BrodyBoy
    dBpoweramp Guru

    • Sep 2011
    • 777

    #2
    Re: [FRONTFOLDER]string[] and [BACKFOLDER]string[] functions

    Originally posted by mville
    In Naming section, I can get [TRIMFIRSTFOLDER]string[] and [TRIMLASTFOLDER]string[] functions to work, but I can't get [FRONTFOLDER]string[] and [BACKFOLDER]string[] to work.

    Has anyone got these functions working and if so, how?
    I've never seen those two anywhere in the documentation (yes...I use that term loosely ). Where did you see them?

    Comment

    • mville
      dBpoweramp Guru

      • Dec 2008
      • 4021

      #3
      Re: [FRONTFOLDER]string[] and [BACKFOLDER]string[] functions

      Originally posted by BrodyBoy
      I've never seen those two anywhere in the documentation (yes...I use that term loosely ). Where did you see them?

      Comment

      • BrodyBoy
        dBpoweramp Guru

        • Sep 2011
        • 777

        #4
        Re: [FRONTFOLDER]string[] and [BACKFOLDER]string[] functions

        Interesting! I've seen that page a zillion times and never noticed that function. I assume you tried with and without a backslash? No difference?

        Comment

        • mville
          dBpoweramp Guru

          • Dec 2008
          • 4021

          #5
          Re: [FRONTFOLDER]string[] and [BACKFOLDER]string[] functions

          Originally posted by BrodyBoy
          I assume you tried with and without a backslash? No difference?
          Whatever I have in the string, nothing (blank/null) is being returned.




          Last edited by mville; March 14, 2015, 02:21 AM.

          Comment

          • BrodyBoy
            dBpoweramp Guru

            • Sep 2011
            • 777

            #6
            Re: [FRONTFOLDER]string[] and [BACKFOLDER]string[] functions

            You wouldn't use the f1,f2, etc arguments. Those are just for the example in the instructions.

            I think it should look something like this:

            [FRONTFOLDER]\[ARTIST]-[TRACK]-[TITLE] (or whatever specific naming string you put after the folder specification)


            Have you tried anything like that?

            Comment

            • Spoon
              Administrator
              • Apr 2002
              • 44509

              #7
              Re: [FRONTFOLDER]string[] and [BACKFOLDER]string[] functions

              You are setting naming in Music Converter (not multi-encoder, or CD Ripper)?
              Spoon
              www.dbpoweramp.com

              Comment

              • mville
                dBpoweramp Guru

                • Dec 2008
                • 4021

                #8
                Re: [FRONTFOLDER]string[] and [BACKFOLDER]string[] functions

                Originally posted by BrodyBoy
                You wouldn't use the f1,f2, etc arguments. Those are just for the example in the instructions.
                Yes, I realise f1\f2\f3 are just examples but it is still a string and I am expecting some sort of result, as in the [TRIMFIRSTFOLDER] screenshot.

                Originally posted by BrodyBoy
                [FRONTFOLDER]\[ARTIST]-[TRACK]-[TITLE] (or whatever specific naming string you put after the folder specification)

                Have you tried anything like that?
                Yes, I have tried using my naming string, and I cannot get it working.

                Comment

                • mville
                  dBpoweramp Guru

                  • Dec 2008
                  • 4021

                  #9
                  Re: [FRONTFOLDER]string[] and [BACKFOLDER]string[] functions

                  Originally posted by Spoon
                  You are setting naming in Music Converter (not multi-encoder, or CD Ripper)?
                  No, in CDRipper Naming. [FRONTFOLDER]my naming string[] is returning nothing.

                  Comment

                  • BrodyBoy
                    dBpoweramp Guru

                    • Sep 2011
                    • 777

                    #10
                    Re: [FRONTFOLDER]string[] and [BACKFOLDER]string[] functions

                    Originally posted by mville
                    No, in CDRipper Naming. [FRONTFOLDER]my naming string[] is returning nothing.
                    Sorry, I didn't realize what you were trying to illustrate with your images. I get it now. Upon thinking about it some more, a couple thoughts came to mind:
                    • Wouldn't this only be applicable to Music Converter? In CD Ripper, there is no "origpath," per se, from which to trim folders or select front or back, since the optical drive is the source location. Wouldn't these particular arguments only be able to manipulate an existing folder structure?
                    • Might it possibly require [origpath] so as to specify the folder tree? In other words, [FRONTFOLDER] = return only the first level of the folder tree, with folder tree presumably being the [ORIGPATH]. (I imagine you could write out a different folder tree, but why would you do that, only to want the first or last one?)


                    This led me to try these ideas in M.C. I selected some files that are about four folders deep in my "works in progress" directory. Selecting the root path on the "Folder" line, then using this pattern on the Dynamic line:

                    [FRONTFOLDER][ORIGPATH][]\[artist]\[track]-[title]

                    ...it performed as expected, and put the files into an artist folder in the first level folder (under the root). Note that if I didn't set the root path on the folder line, it created the new directory in the root of "My Music."

                    Perhaps that can at least give a little more direction in figuring how to get it to do what you want.

                    Comment

                    • mville
                      dBpoweramp Guru

                      • Dec 2008
                      • 4021

                      #11
                      Re: [FRONTFOLDER]string[] and [BACKFOLDER]string[] functions

                      Originally posted by brodyboy
                      • wouldn't this only be applicable to music converter? In cd ripper, there is no "origpath," per se, from which to trim folders or select front or back, since the optical drive is the source location. Wouldn't these particular arguments only be able to manipulate an existing folder structure?
                      Based on what Spoon asked me, I'm beginning to think that [FRONTFOLDER]string[] is only available in Music Converter naming. This is not the case for [TRIMFIRSTFOLDER]string[] as I have used it successfully in CDRipper naming. What I would like is to see the [FRONTFOLDER]string[] programmable action made available to CDRipper naming, just as [TRIMFIRSTFOLDER]string[] is.

                      The Reason (not for the faint hearted):
                      Currently, the ability to manipulate multivalue tags in dBpoweramp is very limited, to say the least.

                      By using a combination of [tags]<element>,deliminator[] and [TRIMFIRSTFOLDER]string[] and (if it were available in CDRipper naming) [FRONTFOLDER]string[]
                      this could be achieved.

                      What I want is this. IF album artist sort is not a multivalue tag then return the album artist sort tag ELSE return the album artist sort second multivalue tag. I could achieve this with:

                      [if],=,[TRIMFIRSTFOLDER][tags]album artist sort,\[][],[tag]album artist sort[],[FRONTFOLDER][TRIMFIRSTFOLDER][tags]album artist sort,\[][][][]

                      So, hopefully Spoon could see his way to get the [FRONTFOLDER]string[] to be available to CDRipper naming, the same way that [TRIMFIRSTFOLDER]string[] is.

                      Remember, these programmable actions are just string manipulation functions, that can be very useful.

                      Comment

                      • Spoon
                        Administrator
                        • Apr 2002
                        • 44509

                        #12
                        Re: [FRONTFOLDER]string[] and [BACKFOLDER]string[] functions

                        Will check for next beta
                        Spoon
                        www.dbpoweramp.com

                        Comment

                        • Spoon
                          Administrator
                          • Apr 2002
                          • 44509

                          #13
                          Re: [FRONTFOLDER]string[] and [BACKFOLDER]string[] functions

                          [FRONTFOLDER] and [BACKFOLDER] are not used with a string, rather a position, for example

                          [FRONTFOLDER]2[]

                          extracts the 2nd folder from the source directory.
                          Spoon
                          www.dbpoweramp.com

                          Comment

                          • stephenrjr

                            • Feb 2017
                            • 22

                            #14
                            Re: [FRONTFOLDER]string[] and [BACKFOLDER]string[] functions

                            Using Batch Converter, I can't get this syntax to work.

                            Given [origpath] constructed like: folderX/folderY/folderZ/<artist_here>/<album_here>/<filename_here>

                            Trying to use: [BACKFOLDER]2[]/[BACKFOLDER]1[]/[origfilename]

                            Produces: DESTINATION/<album_here>/<filename_here>

                            Expected: DESTINATION/<artist_here>/<album_here>/<filename_here>

                            Am I using this feature correctly?

                            (I've tried R2022-01-20 and Beta 2023-03-10 -- same result with each)

                            Comment

                            Working...

                            ]]>