Thanks to DC for the pointer. I have come across the following
VB example, within the SQL Server install directory
C:\Program Files\Microsoft SQL Server\80\Tools\Devtools\Samples\Sqldmo\
Vb\SQLScri pts
It is possible to change this
vb program to dump a file with a date stamp affixed to the filename e.g. pubs20030717.txt, though it is just as easy to stick with the Generate SQL Script within EM.!!!