Sorry @ronald, I misunderstood and thought you already work with the AppleScript shown above.
The script is from @tom, unfortunately I can't find the post for it. Just an older post from me:
I do not use Default Folder. Maybe someone else can help you there.