Created
June 27, 2018 01:26
-
-
Save DavidRogersDev/5d0c38d39a104ab850ee0c898753b8b7 to your computer and use it in GitHub Desktop.
Concatenate all sql scripts in a directory into 1 script. I end every script file with a GO statement, which separates them in the consolidated script file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$file = "consolidated-script.txt" | |
$filenew = "consolidated-script.sql" | |
cat *.sql | sc consolidated-script.txt | |
Rename-Item $file $filenew |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment