I have the following script snippet:
tell application “Finder”
delete folder “Delivery Notes” of folder “Admin” of disk “Current Jobs”
But how do modify this script so that the folder “Delivery Notes” is only deleted if it is empty?
Thanks in advance
This might work.
tell application "Finder"
set target_fol to folder "Delivery Notes" of folder "Admin" of disk "Current Jobs"
if (count items of target_fol) is 0 then delete target_fol
on error e number num
display dialog e & return & num
Works a treat. Cheers Rob.