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

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