Live Chat & Podcast at 1:00PM Eastern on Sunday!
There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
Search
Windows Server
Tag Cloud
access acer asus bios bsod computer crash desktop driver drivers error ethernet excel freeze gaming hard drive hardware hdmi internet laptop malware memory modem monitor motherboard mouse network printer problem ram registry repair router slow software sound trojan ubuntu 11.10 uninstall usb video virus vista wifi windows windows 7 windows 7 32 bit windows 7 64 bit windows xp wireless
Search
Search for:
Tech Support Guy Forums > Operating Systems > Windows Server >
Multiple batch file amendment

Reply  
Thread Tools
sajmeister's Avatar
Junior Member with 2 posts.
 
Join Date: Nov 2009
Experience: Intermediate
20-Nov-2009, 11:53 AM #1
Multiple batch file amendment
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's Avatar
Trusted Advisor with 18,706 posts.
 
Join Date: Apr 2003
Location: 1265 Lombardi Ave
Experience: Bocks of Rox
20-Nov-2009, 02:43 PM #2
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

Last edited by Squashman; 20-Nov-2009 at 03:04 PM..
sajmeister's Avatar
Junior Member with 2 posts.
 
Join Date: Nov 2009
Experience: Intermediate
25-Nov-2009, 07:12 AM #3
Thanks for your reply.

The code is straight forward:-

From

Call \\rlhxxxx\netlogon\Allusers.bat

To

Call %logonserver%\netlogon\Allusers.bat

Sajmeister
Squashman's Avatar
Trusted Advisor with 18,706 posts.
 
Join Date: Apr 2003
Location: 1265 Lombardi Ave
Experience: Bocks of Rox
25-Nov-2009, 12:54 PM #4
Using the utility I linked to above.

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

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Search Tech Support Guy

Find the solution to your
computer problem!




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who want to help you solve your computer problems. See our Welcome Guide to get started.
Thread Tools



Facebook Facebook Twitter Twitter TechGuy.tv TechGuy.tv Mobile TSG Mobile
You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 12:36 AM.
Copyright © 1996 - 2011 TechGuy, Inc. All rights reserved.

Powered by Cermak Technologies, Inc.