• It is possible by using this script add a number of sps at once , rather than keep changing the path to point to a different sp

    For example;

    INSERT INTO ##SQLFiles

    EXECUTE master.dbo.xp_cmdshell 'dir /b "\\ServerUNC\Folder1\DBA_TSQL_Scripts\Procedure\*.sql"'

    GO

    INSERT INTO ##SQLFiles

    EXECUTE master.dbo.xp_cmdshell 'dir /b "\\ServerUNC\Folder1\DBA_TSQL_Scripts\Procedure\test.sql"'

    GO

    INSERT INTO ##SQLFiles

    EXECUTE master.dbo.xp_cmdshell 'dir /b "\\ServerUNC\Folder1\DBA_TSQL_Scripts\Procedure\test2.sql"'

    GO

    ........