How can I share values in maintenance plan tasks? A simple example would be a maintenance plan that clears a directory of old files and create some copy backups of all databases on that instance to that same directory. This is run daily

The first cleanup step contains the path where the files are deleted. The second step actually creates the copy backups in the same directory as the first step. So any changes made to the path have to be done in multiple places. For a simple 2 step maintenance plan this is not really a big issue but could be for more complicated plans. 

So is there a way that plan steps can share information? I don't necessarily mean passing information between steps but perhaps a global space of the steps?

I could not see anything in the toolbox that would work for this. Best I got is that I could add two new steps.


Create a temp table with the path (and any other constants.)
Using that path delete directory contents
Run copy-backups
Delete temp table


I had thought this question: Can I pass data between stages in a maintenance task would have helped but it was focused on sending completion information in email.
For global parameters we would use package configuration files, perhaps they would work for you as well: Package Configurations