There are some script files in a folder that must be executed on a SQL Server database. Not all of the files in the folder, just a subset. The following command is in a batch file and it is working but the files are all on one line. It is very difficult to read (there are more files than the 3 shown in the example). Is there a way that the files can be listed on individual lines (for readability) and not lose the functionality? The goal is to perform this task using a batch file only - not a batch file + a SQL file that uses the :r command for each script to be executed.
sqlcmd -S ServerInstance -E -d DatabaseName -i .\Tables\stage.products.sql, .\Tables\dbo.products.sql, .\Sprocs\dbo.BuildProducts.sql