FileWatcher -> Macros -> FileParentDir

Hi all,

i got a problem/request regarding the macros available in the FileWatcher dialog.

Is it somehow possible to get the dirname of the parent directory, becaue FileParentDir returns the full path, which doesn't help me in my case.

We have the following folder structure

- app1
- templates
   - template 1
- app2
  - templates
    - template 1

A file watcher on any of those templates returns "templates" as FileDirName, which is totally reasonable, however i need to pass the name of the app to my node script.

Is that somehow possible?
Can i somehow write my own macros for the fileWatcher dialogs?

Thanks in advance for your time

1 comment

Hi there,

Can i somehow write my own macros for the fileWatcher dialogs?

No

A file watcher on any of those templates returns "templates" as FileDirName, which is totally reasonable, however i need to pass the name of the app to my node script.

You can still use $FileParentDir$ .. but pass it via your intermediate custom script that will extract such folder name and will execute actual command from inside.

Other than that -- I personally do not know .. and may only suggest to file a Feature Request ticket to the Issue Tracket (e.g. new macro function that will return folder name only for any parameter passed (and maybe optional second parameter that will hold the required level, counting from the end, so it's possible to get any folder name in the path at desired level))

0

Please sign in to leave a comment.