applescript仅获取文件夹的文件名

applescript仅获取文件夹的文件名,applescript,Applescript,下面的脚本列出了文件夹的内容(文件和文件夹) set the_files to (list folder (choose folder) without invisibles) e、 g文件夹根目录有一个文件text1.txt和文件夹subroot2和subroot3 但是,如何才能只获取文件夹根目录(不包括subroot2和subroot3)的文件名(仅text1.txt)?谢谢 tell application "Finder" files of folder (choose f

下面的脚本列出了文件夹的内容(文件和文件夹)

 set the_files to (list folder (choose folder) without invisibles)
e、 g文件夹根目录有一个文件text1.txt和文件夹subroot2和subroot3

但是,如何才能只获取文件夹根目录(不包括subroot2和subroot3)的文件名(仅text1.txt)?谢谢

tell application "Finder"
    files of folder (choose folder) -- Finder file objects
    name of files of folder (choose folder) -- names of files
end tell