Script no longer works

This script used to work fine many updates ago (10.6.x). When I tried using the script it failed at getting the folder above the name lines near the bottom, I have just surrounded it with a finder tell but now it errors on getting the name of item of… even though name in in the finder scripting library. Help please :slight_smile:

tell application "Finder"
	set varscripts to {}
	repeat with varfile in files of folder (choose folder) as list
		if type identifier of (info for (varfile as alias)) is "com.apple.applescript.text" then
			set varscripts to varscripts & (varfile as alias as string)
		end if
	end repeat
end tell
log varscripts
set vartext to ""
repeat with varscpt in varscripts
	set vartext to vartext & (read (varscpt as alias))
end repeat
tell application "Finder"
	"Count:" & (count paragraphs of vartext) & "
Scripts in folder " & (folder of (item 1 of varscripts as string as alias)) & ":
" & name of (item 1 of varscripts) & "
" & name of item 2 of varscripts & "
" & name of item 3 of varscripts & "
" & name of item 4 of varscripts & "
Text:

" & vartext
end tell

Ugh sorry, fixed, needed ‘name of file’, although it definitely worked before. :confused: