我想获取文件夹测试
中创建的最后一个文件的路径set p to "/Users/palmglow/Documents/googledrive/orders/IFTTT/test"
set a to POSIX file "/Users/palmglow/Documents/googledrive/orders/IFTTT/test/"
set latestFile to last item of (sort (get files of (POSIX file "/Users/palmglow/Documents/googledrive/orders/IFTTT/test")) by creation date) as alias
答案 0 :(得分:0)
尝试:
set myFolder to "/Users/palmglow/Documents/googledrive/orders/IFTTT/test"
tell application "Finder" to set latestFile to item 1 of (sort files of (POSIX file myFolder as alias) by creation date) as alias