did you have any solution?
In Dispatch are available Userdefinied variables.
There it is possible to set variable value - a name of the current folder.
Then, you set this variable and a condition - for the current folder.
You execute a command on the folder, but not on the file.
There shall not be problems.