而不是做
if exists folder1 then
delete folder1
end if
if exists folder2 then
delete folder2
end if
...
...
有办法吗?
delete folder1 folder2 ... folderN
感谢。
LJ
答案 0 :(得分:1)
您没有说明如何设置folder1,folder2等,但假设已经设置了这些变量,这里是如何使用列表并重复遍历列表。
set folderList to {folder1, folder2}
repeat with thisFolder in folderList
delete thisFolder
end repeat