@GrassHopper : I followed the script to the letterm I guess the server name is just another string in the .sql file and I can use it as anything.
I am trying to auto encrypt my files.
I place a line with a comment on development environment
I script out all the objects into a .sql file
I use your script to do a ctrl find replace
"--with encryption" to just "with encryption"
All I simply do is the set @servername to "--with encryption" and @newservername to "with encryption"
Everyother thing remains the same.
The script builds the batch file, I see it in the folder. It also creates the new file.sql but nothing is contained in the new file though it calls it the exact name I asked it to.
Pls help. Thanks