SQL Server 2012 : How to script all database stored procedures into separate .sql files?
<p>I want to script all the stored procedures from SQL Server 2012 to Visual Studio 2012 as  <code>.sql</code> files (in a different project). How do I do that?  I want one .sql file for each stored procedure? 
I get the scripts using the Generate Scripts in Tasks option after right clicking DB in SQL Server 2012. However, the name of the .sql file is spname.StoredProcedure in each case. I want the name to be spname.sql. 
Again I don't want the file name to be database.spname.StoredProcedure, I want it to be just spname.sql</p>