write file name in text doc of dir

sofar I have this and I need it to also write the date modified and size of doc, any ideas? also if I could just get file name instead of entire dir, that would be awesome.

property fileName : "Files.txt"

on run
	choose folder with prompt "Get list of files from this folder:"
	open {result}
end run

on open droppedItems
	set ASTID to AppleScript's text item delimiters
	tell application "Finder" to launch
	
	repeat with thisItem in droppedItems
		if (folder of (info for thisItem without size)) is true then
			set AppleScript's text item delimiters to (ASCII character 13)
			tell application "Finder" to set theList to entire contents of thisItem as text
			set AppleScript's text item delimiters to ""
			
			try
				open for access file ((thisItem as text) & fileName) with write permission
				set theFileRef to result
				
				write theList to theFileRef
				close access theFileRef
			on error errorMsg number errorNum
				try
					close access theFileRef
				end try
				display dialog "Error (" & errorNum & "):" & return & return & errorMsg buttons "OK" default button 1 with icon caution
			end try
		end if
	end repeat
	
	set AppleScript's text item delimiters to ASTID
	return true
end open

Hi,

try this


property fileName : "Files.txt"

on run
	choose folder with prompt "Get list of files from this folder:"
	open {result}
end run

on open droppedItems	
	repeat with thisItem in droppedItems
		if (folder of (info for thisItem without size)) is true then
			tell application "Finder" to set theList to entire contents of thisItem
			try
				set textFile to ((thisItem as text) & fileName)
				set theFileRef to open for access file textFile with write permission
				repeat with anItem in theList
					set {modification date:modificationDate, name:itemName, size:itemSize} to (info for (anItem as alias))
					write (itemName & tab & (modificationDate as text) & tab & itemSize & return) to theFileRef
				end repeat
				close access theFileRef
			on error errorMsg number errorNum
				try
					close access file textFile
				end try
				display dialog "Error (" & errorNum & "):" & return & return & errorMsg buttons "OK" default button 1 with icon caution
			end try
		end if
	end repeat
	
	return true
end open