Button that acts on folder - not selected files

Good sirs.

I have an AHK script that loops all files in a particular folder and processes them.

having a hard time (without rewriting the script) getting a button to make this script work

What would be the argument I would use to process the folder currently active in the selected lister?

Thanks

{sourcepath$} is not doing it for me

{sourcepath$} is the right thing. You might need to use {sourcepath$|noterm} if the script can't cope with a \ at the end of the path.

Failing that, test what happens when you manually run the script with a path to make sure you are running it in the way it expects.