Moving Containing Folder of A File

You can use the following AppleScript to have Hazel move the folder containing the selected file to a new location.
- Code: Select all
my hazelProcessFile(leFiche)
on hazelProcessFile(leFiche)
try
tell application "Finder"
activate
set leDossier to container of (selection as alias)
move leDossier to folder "users:me:documents:" of startup disk
end tell
on error
display dialog "Ummmm.... What?"
end try
end hazelProcessFile