Move folders to Folder based upon first 2 to 3 letters of the folder

I use the rename where you can organize folder based upon first letter of the Folder name but is it possible to organize based upon the first 3 letters such as The Adventures of Robin Hood goes to T A Folder, Tugboat Annie Folder goes to Tu Folder and The Wizard of Oz folder gooes to T W Folder. Thanks

Seems you are looking for something like this:

Mode: Regular Expressions
Old name: (.).*? (.).*
New name: \1 \2\\\0

Thanks that works with some of them but does not work some of them such as Tugboat Annie because it should be in Tu and not T A. It works on ones like The Wizard of Oz witch goes in T W.

So you want special handling when the first word is "The".

Are there any other words you want special handling for?

What do you want to happen when the first word is only one character, e.g. "A" or "I"?

These details need to be well defined before a solution can be offered, since they may require a very different solution.

If the first word is only one letter such as A or I then it would go A space Next letter such as A Bridge too far would go to A space B where A Guy named joe would got to A Space G folder. Files such as Above and Beyond would go to Ab. Ones that Start with The would be The Space Next letter. So far this is the only one I special for. Also that The space movies are not the same as The with no space after.

Here is a Rename Preset which I think does what you've asked for:

Example results:

2020-04-16 04-52-52 Clipboard Image

For reference, this is the script inside the preset (.orp file) above:

function OnGetNewName(getNewNameData)
{
	var name = getNewNameData.newname;
	var words = name.split(" ");
	var w1 = words[0];
	var w2 = words[1];

	if (words.length < 1 || w1.length < 1)
		return;

	if (w1.toUpperCase() == "THE")
		w1 = "T";

	var result;

	if (w1.length > 1)
		result = w1[0] + w1[1];
	else if (words.length > 1 && w2.length > 0)
		result = w1[0] + " " + w2[0];
	else
		result = w1[0];

	return result + "\\" + name;
}

EDIT after 5 minutes: Fixed it for when the input folder name is only one character long.

1 Like

It works thank you so much. Makes organizing so much easier.

1 Like