How were you trying to pull the parent folder name? At any rate, this worked for me:
Rename File to Parent Folder.kmmacros (2.4 KB)
For more information, see the wiki Searching the Forum for Answers section.