# Multiple batch file amendment



## sajmeister (Nov 20, 2009)

Hi guys,

I need to find a way of updating multiple batch files that are stored in the Netlogon share on the domain controllers. I only need to change one line in the batch file if it exists to a new value.

I really don't want to do this manually as there are hundreds of batch files in the Netlogon share.

Thanks

Sajmeister


----------



## Squashman (Apr 4, 2003)

Easy enough to do.
What is the value and what do you need it changed to.
And could you post the whole line of code you use in the batch file that needs changing.

This would probably be the easiest way to do it. This is a pretty awesome utility.
http://www.bestcode.com/html/findreplace.html


----------



## sajmeister (Nov 20, 2009)

Thanks for your reply.

The code is straight forward:-

From

Call \\rlhxxxx\netlogon\Allusers.bat

To

Call %logonserver%\netlogon\Allusers.bat

Sajmeister


----------



## Squashman (Apr 4, 2003)

Using the utility I linked to above.

replace -find "\\rlhxxxx" -replace "%logonserver%" -fname *.bat


----------

