To get the current *.cfm
file I use:
GetFileFromPath(GetCurrentTemplatePath())
Is there a simple way to get the parent of the current file?
I.e. if the current file is ...\MyApp\Users\addUser.cfm
I want to return Users
.
Edit: the reason I want to do this is to check for access permission. Depending on path different policies will be enforced.
Edit: The linked question doesn't provide the correct answer.
GetFileFromPath(GetFileInfo(GetCurrentTemplatePath()).parent)
This will return exactly what I need. Using the example from the question: just Users
withouth the full path.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With