Make file hidden via AppleScript droplet

I have searched everywhere for what AppleScript commands I give the Finder to turn on a file’s Hidden flag, I can’t find this info.

I don’t want to show or hide hidden files, I want to take a file and hide it.

My current method for doing this is to use File Buddy to Get Info on the file, then set the hidden flag and save. I want a way to do this via AppleScript. Thanks.

I’m not aware of a way to use Finder to do this.

However, if you have the Developer Tools installed, then this should work:

on open droppedItems
	try
		repeat with thisItem in droppedItems
			do shell script "/Developer/Tools/SetFile -a V " & quoted form of POSIX path of thisItem
		end repeat
	on error errMsg number errNum
		display dialog "Error " & errNum & ":" & return & return & errMsg buttons {"Cancel"} default button 1 with icon caution
	end try
end open

Thank you, that seems like it will work, I appreciate it.