How to create a text file with the folder name?

I'm trying to make a button that will create an empty text file with the same name as the containing folder. I know I enter this in the command editor to create the button and specify a name:

FileType NEW=.txt NEWNAME=

Is there a way to pass the folder name in this function?

FileType NEW=.txt NEWNAME="{sourcepath|nopath|noterm}.txt"
1 Like

Perfect! Thank you.