So if you use "Run shell script" and typed in the following:
- Code: Select all
LONG_FILENAME="$1"
echo "Name with full path: $LONG_FILENAME"
echo "Name with only filename: $(basename $LONG_FILENAME)"
If the rule matched the file /usr/local/bin/foo this would be the output:
- Code: Select all
Name with full path: /usr/local/bin/foo
Name with only filename: foo
Hope it helps someone

Ps I have only used Hazel for a day, so if there is a better way please tell me
