file path question

I’m creating a folder action and need to get the path to a file that has been moved into the folder. This seems very simple, but I’ve been unable to figure it out after lots and lots of looking. I’m very new to applescript and I guess I just don’t know what to look for.

Here’s what I have so far:


on adding folder items to this_folder after receiving added_items
	try
		tell application "Finder"
			set the folder_name to the name of this_folder
		end tell
		
		(* create string variable and set it to the path of the added file in this format: "/Users/admin/Desktop/upload/BlaupunktRadio.mpg" *)

	end try	
end adding folder items to

Any help would be greatly appreciated. :wink:

Welcome to the forum!

Try this.

on adding folder items to this_folder after receiving added_items
	repeat with _item in added_items
		set _path to POSIX path of _item
		display dialog _path
	end repeat
end adding folder items to

Happy Scripting =)

That’s exactly what I need! Thanks James :smiley: