Capture folder name as variable

Hi Guys,

I have a folder name say ABC-123-PP. I want to capture the name as a variable.

The reason is I want to use it to name my file for example ABC-123-PP-TEST.sldprt when I create a SolidWorks part using a template.

Is there a way to do it?

Kindly advise.

James

SolidworksSolidworks Pdm enterprise Pdm