Substring of DirName?

Advanced Renamer forum
#1 : 16/05-12 23:20
jbreaker
jbreaker
Posts: 3
Is there any way to use the <DirName:> tag with any other options to get a substring of the directory name?

I'm trying to copy files in folders nested down a few levels to a new location. The <Dirname:3> tag works great to grab the part of the path I want, but the folders the files start out in have names like "_LOCATION" and I want the new path to be "LOCATION" - without the _.

Is there any way to accomplish this?

Thanks!


16/05-12 23:20
#2 : 18/05-12 12:18
Kim Jensen
Kim Jensen
Administrator
Posts: 756
Reply to #1:
I think what you need to do is apply a Replace method after you have used the DirName tag. The difficult part is finding a consistent pattern you can replace with an empty text string or a blank space.


18/05-12 12:18
#3 : 21/05-12 16:07
jbreaker
jbreaker
Posts: 3
Reply to #2:
How can I apply the Replace method to the directory path, though? I only see it as an option for the Name or Extension...


21/05-12 16:07
#4 : 27/05-12 22:49
Kim Jensen
Kim Jensen
Administrator
Posts: 756
Reply to #3:
Are you using this as a rename option or are you using copy or move mode? If used in the renaming methods you should be able to add a replace method in the chain of methods and replace a part of the new name.


27/05-12 22:49
#5 : 01/06-12 23:06
jbreaker
jbreaker
Posts: 3
Reply to #4:
I am trying to do it on copy mode, unfortunately.


01/06-12 23:06
#6 : 04/06-12 21:16
Kim Jensen
Kim Jensen
Administrator
Posts: 756
Reply to #5:
For the copy/move mode you are out of luck. Most people only use the renaming feature which is why the copy/move mode is a little more limited. It was a feature added many years after the first release.


04/06-12 21:16