sql - Modify argument in batch script -
in nutshell need way convert batch file containing content -> sqlcmd -s rave -v payment late = %1 -i rave_params.sql -o alert.txt
-to-
a new batch file containing content -> sqlcmd -s rave -v "'your payment late'" = %1 -i rave_params.sql -o alert.txt
your question isn't clear me. want create new batch file based on content of old one? if so, i'd recommend using powershell transformation:
$srch = '-v\s*(.*?)\s*=\s*%1' $repl = "-v `"'`$1'`" = %1" (get-content old.bat) -replace $srch, $repl | set-content new.bat
Comments
Post a Comment