I've list of mssql named instance in a text file. I want to read one by one in DOS batch file and replace \ with -
I've list of mssql named instance in a text file. I want to read one by one in DOS batch file and replace \ with -.
Intention : I need to connect to list of mssql instances given in a text file, and run a certain query given in sql file. And want to store the output in the csv file by naming it with respective mssql instance name.
Problem: My scripts works well as long as it is default instance i.e. named instance has \ special character in it, so could not create a csv file like HostName\instance name.csv
Ask: Is there any command in DOS bat file to replace \ with any character/letter such as - or _ or any alphabet letter?