Using a specific folder name from a file path in a rename

Hi,
I'm new to hazel and have read all the suggested help sections you recommend before posting a new question and I'm still not quite getting to an answer.
I have a file path like this:
ClassName(monitored folder) > StudentLastName_StudentFirstName(folder) > TurnIn(folder) > ProjectName(folder) > imageFile.jpg(usually more than 1 image file)
I am trying to rename the image files with the following pattern:
StudentLastName_StudentFirstName ProjectName # extension
I am having trouble isolating and/or adding the LastName_FirstName portion of the file path. I think the solution might be using a custom attribute(?) but I haven't been able to make that work. I have also tried several different renaming tokens with no success.
Thanks for your help.
I'm new to hazel and have read all the suggested help sections you recommend before posting a new question and I'm still not quite getting to an answer.
I have a file path like this:
ClassName(monitored folder) > StudentLastName_StudentFirstName(folder) > TurnIn(folder) > ProjectName(folder) > imageFile.jpg(usually more than 1 image file)
I am trying to rename the image files with the following pattern:
StudentLastName_StudentFirstName ProjectName # extension
I am having trouble isolating and/or adding the LastName_FirstName portion of the file path. I think the solution might be using a custom attribute(?) but I haven't been able to make that work. I have also tried several different renaming tokens with no success.
Thanks for your help.