A SQL Server database that is in development has a Project
folder, and within it there are subfolders Tables
, Views
, Triggers
, Sprocs
. Within each subfolder are several .sql
files and other miscellaneous folders.
The goal is to create a batch file which executes all .sql
files within the subfolders, making use of SQLCMD
for the execution.
How can a batch file be written to look in the Project
's subfolders to find *.sql
so they're executed in the database automatically?