Page 1 of 1

Length of File Name

PostPosted: Fri May 30, 2014 6:05 pm
by learned
I am trying to flag files which have file names > 150 characters. I'm using the following embedded bash script as a test.

Code: Select all
string="$1"
 
length=$(echo ${#string})

if [ $length -gt 150 ]
then
   exit 0
fi

exit 1


It seems as it should work, but long file names still seem to not get flagged. Any ideas of how to accomplish this?

Re: Length of File Name

PostPosted: Mon Jun 02, 2014 3:20 pm
by Mr_Noodle
You'll have to debug this outside of Hazel first, then within Hazel using prints and such to see what's going on.