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

Posted on Dec 17, 2023 10:10 AM

Reply

Similar questions

There are no replies.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

applescript for nested folders

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.