Use this dataflow to export your data flows to .lna format and write them to a location of your choosing. It can be used from version 3.2.2 onwards, and we encourage all users to run it regularly. It can also be used as a stepping stone towards interfacing with software or code version tracking systems, such as SVN or Github.
In the General properties, you'll need to change the Username, Password and OutputFolder fields, as well as the various parameters of the SendEmail node so that you'll receive notification. The username must be for a user that has the "admin" role or it will not find all dataflows to export. As with any dataflow, even if you copy this to another system, you'll still have to re-update the password.
Please note, the attached code will only export dataflows - it does not export schedules, or any other objects.
While exporting, it uses the option "Include Dependencies", which means that each exported LNA will include any user library nodes needed by the Dataflow. When you import each LNA, it imports your user library nodes into the same folder with the data flow. This may cause you to have duplicate copies of the library nodes throughout all the folders.
Each Dataflow it finds is exported to the OuptutFolder, creating appropriate sub-folders to match the tree in your Directory. In addition, each exported Dataflow is named with the date of last modification. Older copies of the LNA are retained so that you have a incremental history of the system each time you run this. If you haven't modified a dataflow in months, the export will still be the same old copy, if you've made recent updates, this exports a new LNA with the most recent changes, and the old one is retained in the OutputFolder. Should you schedule this dataflow, it's up to you to manage those older generations.
Before running this data flow you should consider the potential proprietary nature of the contents of the LNAs and the email. Consider who should have access to the OutputFolder and who the recipients of the Send Email node need to be. The SendEmail node could be removed or replaced with an Output Excel node.