Skip to content

Instantly share code, notes, and snippets.

@matt40k
Created May 28, 2015 10:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matt40k/76188e06d053f30cb1b9 to your computer and use it in GitHub Desktop.
Save matt40k/76188e06d053f30cb1b9 to your computer and use it in GitHub Desktop.
Loop through folder and update the files - changes from int to smallint - save a few bits ;)
$dir = "C:\SVN\SQL"
$files = Get-ChildItem $dir -Filter *.sql
Foreach ($file in $files) {
(Get-Content $file.FullName).replace('[ETL_Run_ID] [int]','[ETL_Run_ID] [smallint]') | Set-Content $file.FullName
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment