Just an FYI there is a UDF to check if the folder is empty. This is not as easily done with EXIST alone.

EmptyFolder() - checks if folder is empty