In the attached file you can find a sample page that creates a backup of the widget templates. To create a backup you have to change the user authentication to forms.
On button click the widget templates will be saved in SitefinityWebApp\App_Data\Sitefinity\WidgetTemplatesBackup\WidgetTemplates-[date]
folder. If you select the checkbox on the page, a zip file will be created (not a folder).
I hope you will find this useful.
There is no EventHub event for before template save. I have logged this into PITS, you can track it here:
All the best,
the Telerik team
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking
system and vote to affect the priority of the items