Taking Filename and Populating A Variable Automatically

I am moving some legacy data over into a new PDM vault.  I want the filename to populate a variable called part ID on the datacard as I add the files to the vault.  How would I go about doing this?

SolidworksSolidworks Pdm enterprise Pdm