[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

(DTPtechNote:161) cat_it



(c)2002 市川せうぞー www.seuzo,jp

on open dropList
	set new_file to (choose file name with prompt "Where do you save new file?")
	set new_file to POSIX path of new_file
	set fileList to {}
	repeat with aFile in dropList
		set aPath to POSIX path of aFile
		set end of fileList to aPath
	end repeat
	set old_dlimi to AppleScript's text item delimiters
	set AppleScript's text item delimiters to {tab}
	set fileList to fileList as text
	set AppleScript's text item delimiters to old_dlimi
	set fileList to do shell script "perl -e \"print join(' ', sort(split (/\\t/, '" & fileList & "')));\""
	do shell script "cat " & fileList & " > " & new_file
end open