Yes you can pre-configure the number of folder levels to be included when you use the pre-defined renaming command: 'insert folder after/before'.

Go to the Options window (select 'View->Options ...' from the main window menu). On the left panel select the 'Parent Folder Name Insertion' item. Then configure the parent folders you would like to include.

e.g. %P2Folder%_%P3Folder%_%P1Folder%

Don't forget to press 'Apply'

Back in the main window, insert the pre-defined renaming command in the custom list and press 'Scan'. The preview window will pop up with a list of all files to be changed. afterwhich you can review and then press the 'rename' button.