smarter export folder calculation