Add Folder Directory to drawing

I am trying to setup a drawing template to populate a field with the name of the last folder, of the directory where the file is saved.

Example. If the file directory is:

C:\Program Files\SolidWorks Corp\SolidWorks\Samples\Part123.SLDDRW

I want the field to be updated with "Samples"

Not the entire file path.

Is this possible?

SolidworksDrawings And Detailing