When publishing, if the target directory is not empty, display a message warning that all files in the target directory will be deleted. If the user selects OK, attempt to delete all files from the target directory before publishing. If the user selects cancel, then cancel the export. If an error is encountered while deleting files, display an error message then cancel the export.
When publishing, if the target directory is not empty, display a message warning that all files in the target directory will be deleted. If the user selects OK, attempt to delete all files from the target directory before publishing. If the user selects cancel, then cancel the export. If an error is encountered while deleting files, display an error message then cancel the export.