Rename using the first few letters of each word in the directory name

Advanced Renamer forum
#1 : 04/02-13 10:56
Amol
Amol
Posts: 2
Sir, I want to name the files using the file name + First few letters of each word in the directory name.
Please tell me how to do that.
for eg - filename : chapter 1 Directory name : Marketing management
desired filename : chapter 1 Mar Man or chapter 1 - Mark.Mana


04/02-13 10:56
#2 : 04/02-13 11:25
Kim Jensen
Kim Jensen
Administrator
Posts: 771
Reply to #1:
To do this you will need to use the JavaScripting method and use this script:
return item.newBasename + " - " + app.parseTags('<DirName:1>').match(/\b\w{4}/g).join(".");

It will add the first 4 letters of each word in the directory name and add them to the end of the filename separated by ".". If the words are less than 4 letters, it will get excluded.


04/02-13 11:25