on open these_items
	repeat with this_item in these_items
		set path_str to POSIX path of this_item
		try
			set str to do shell script "
			read tstamp name <<< $(stat -f '%Sm %SN' -t '%F_%H-%M-%S' " & path_str & ")
			mv -i \"$name\" \"${name%/*}/$tstamp.${name##*.}\"
			"
		end try
	end repeat
end open

open time-stamp in the applescript editor