Help getting FileName out of theFile using AppleScript

Hey all,
First I want to say that Hazel is AMAZING. There is so much power behing this product and that's just awesome.
I am trying to do some stuff with AppleScript when I've finished processing a file. I am trying to get just the name of the file and not the rest of the path information. For example, here is how I am generating the string:
gives me the following:
Where I want to see:
I'm sure that there is some way to do this, but I've spent about an hour searching through the forums and I can't seem to find it anywhere.
Thanks in advance!
First I want to say that Hazel is AMAZING. There is so much power behing this product and that's just awesome.
I am trying to do some stuff with AppleScript when I've finished processing a file. I am trying to get just the name of the file and not the rest of the path information. For example, here is how I am generating the string:
- Code: Select all
"Processing of " & theFile & " is complete"
gives me the following:
Processing of Macintosh HD:Users:justin:Downloads:MyFile.txt is complete
Where I want to see:
Processing of MyFile.txt is complete
I'm sure that there is some way to do this, but I've spent about an hour searching through the forums and I can't seem to find it anywhere.
Thanks in advance!