Q:

How to generate script of each stored procedure as separate .SQL file in Microsoft SQL Server?

I have to create copy of each stored procedure from a SQL Server database and store at some physical location. I know using "Generate Scripts" we can export all stored procedure in single '.sql' file but I don't want to do it that way. I need individual copy of each stored procedure by their name at some location. Shall I have to write batch script for this? 

A:

In Set Scripting Options while Generate Scripts, use setting like this:

