I have a need to export all of the stored procedures in a database to files on the server dirve. I know that this can be done through the management interface but I need a way to do it programatically. I need to have a script or stored proc that dumps all of the procedures to a defined location on disk. Does anyone know how this can be done
Thanks!

Exporting Stored Procedures to a file
JonasSam
There is an article with a stored procedure that does this at http://www.databasejournal.com/features/mssql/article.php/2205291
Also a slightly different approach to the same problem at http://www.databasejournal.com/features/mssql/article.php/3401081, though the first way is probably the one you want to use.
EWoodruff