1.

Solve : Update bat file contents?

Answer»

I search and found many close examples, so posting this request, easy for some people here Im sure.

We have a group of FILES, mostly .bat files that have passwords in them (yes, I KNOW) and every month the passwords need to be updated.

I WOULD LIKE a batch FILE that takes the new password as a parameter then updates the old one in all the files.

I have this working for most files, but some of our .bat files have special characters in them which are not getting put into the new file.

Example .bat file:

set server=value
set user=value
set password=value
set db=value

pushd %~dp0

CALL "SQLCMD.EXE" -S %server% -U %user% -P %password% -d %db% -Q "%db%.dbo.reSETpartition"

popd



Discussion

No Comment Found