Activate Finder if a folder isn't empty

Hi!

I struggle with this:
I want Finder to activate when a folder contains one file ore more, but nothing happens :_(

==============================

set TheFolder to (“ThePath”)

if (count of TheFolder) is 1 then

tell application "Finder"
	
	activate
	
end tell

end if

==============================

How is this script being activated?

If you want an appleScript to monitor a folder on your mac you should look into Folder Events.

Perfect!!! :D:D:D