title
Products            Buy            Support Forum            Professional            About            Codec Central
 

Folder name & other string or regex manipulations

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • TechVsLife
    dBpoweramp Enthusiast

    • May 2007
    • 95

    Folder name & other string or regex manipulations

    Unless I've overlooked something in the docs, there's no way to do this:
    Rename a file from
    c:\parent1\parent2\Apple\blah1\blah2\blah3\filenam e.wav
    to
    c:\parent1\parent2\Oranges\blah1\blah2\blah3\filen ame.wav

    Also might want to allow regex substitutions (which answer the above request by allowing substitution groups).

    Thanks.
  • LtData
    dBpoweramp Guru

    • May 2004
    • 8288

    #2
    Re: Folder name & other string or regex manipulations

    Actually, yes, as long as you aren't counting the filename manipulation:
    Convert to: C:\parent1\parent2
    Dynamic Naming: [TRIMFIRSTFOLDER][TRIMFIRSTFOLDER][TRIMFIRSTFOLDER]origpath[][][]\origfilename

    Comment

    • TechVsLife
      dBpoweramp Enthusiast

      • May 2007
      • 95

      #3
      Re: Folder name & other string or regex manipulations

      Sorry, let me clarify: I meant allowing for dynamic numbers of levels: i.e. regardless of how many levels of parents there are, it should recreate the same folders beginning with blah1, underneath the same parents, but substituting oranges for apples. I think that would probably require regex.

      Rename a file from
      c:\parent1\parent2\parentn\Apple\blah1\blah2\blah3\blahx\filename.wav
      to
      c:\parent1\parent2\parentn\Oranges\blah1\blah2\blah3\blahx\filename.wav
      Where the number n can vary, but is always the folder immediately before "Apple," and where the number x can vary, but is always the folder immediately before filename.wav

      (This will seem less esoteric if you imagine e.g. that Apples is a lossless and Oranges a lossy music folder whose folder depth varies depending on the drive, but always have the names Apples and Oranges.)

      Originally posted by LtData
      Actually, yes, as long as you aren't counting the filename manipulation:
      Convert to: C:\parent1\parent2
      Dynamic Naming: [TRIMFIRSTFOLDER][TRIMFIRSTFOLDER][TRIMFIRSTFOLDER]origpath[][][]\origfilename
      Last edited by TechVsLife; February 10, 2009, 04:14 AM.

      Comment

      • ckh

        • Mar 2009
        • 4

        #4
        Re: Folder name & other string or regex manipulations

        Is this indeed possible?

        based on some searched this seems a popular and very logic request, but without a clean answer if this is possible.... and how?

        Comment

        Working...

        ]]>