Hi
I want a script that will delete any empty folders of a given folder. I realise that trying to make it checked nested folders may be very difficult so I started by just deleting the empty folders at the top level. However, my script doesn't work. as a complete beginner I hope someone can point me right.
Ideally I would like the script to ask me which folder to check when it first runs but I was getting totally lost with that. Here's what I have
tell application "Finder"
set folderPath to "/Users/Pat/Desktop/Folder1"
repeat with checkFolder in (get folders of folderPath)
if (count items) of checkFolder is 0 then delete checkFolder
end repeat
end tell
Thanks
I want a script that will delete any empty folders of a given folder. I realise that trying to make it checked nested folders may be very difficult so I started by just deleting the empty folders at the top level. However, my script doesn't work. as a complete beginner I hope someone can point me right.
Ideally I would like the script to ask me which folder to check when it first runs but I was getting totally lost with that. Here's what I have
tell application "Finder"
set folderPath to "/Users/Pat/Desktop/Folder1"
repeat with checkFolder in (get folders of folderPath)
if (count items) of checkFolder is 0 then delete checkFolder
end repeat
end tell
Thanks