applescript for nested folders
The script below works well for producing a catalog of files in a folder, but it doesn't include the files in any nested folders. How should I modify it to process the contents of nested folders?
set the_string to ""
tell application "Finder"
repeat with this_item in (get every file in the entire contents of (choose folder))
set the_string to the_string & name of this_item & tab & modification date of this_item & tab & size of this_item & tab & kind of this_item & tab & URL of this_item & return
end repeat
set myfile to open for access (choose file name) with write permission
write the_string to myfile
close access myfile
end tell
Thank you for any help.
iMac 27″, macOS 13.6