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?
Folder name & other string or regex manipulations
Collapse
X
-
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.)
Last edited by TechVsLife; February 10, 2009, 04:14 AM.Leave a comment:
-
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[][][]\origfilenameLeave a comment:
-
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.Tags: None
Leave a comment: