Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Find/Replace Script- HELP!
Name: Zephyrus14 Date: March 23, 2009 at 12:48:47 Pacific OS: Windows XP Subcategory: Batch
Comment:
Hello,
I am trying to make a batch program that opens up a txt file (output.txt) in C:\Directory I need it to search for "MGR_SP" and replace it with "VBS_6UP".
Name: IVO Date: March 23, 2009 at 13:42:19 Pacific
Reply:
@echo off & setlocal EnableDelayedExpansion > C:\Folder\output.new
for /F "delims=" %%j in (C:\Folder\output.txt) do (
set row=%%j
set row=!row:MGR_SP=VBS_6UP!
echo.!row!>> C:\Folder\output.new
)
del C:\Folder\output.txt
ren C:\Folder\output.new output.txt
:: End_Of_Batch
0
Response Number 2
Name: ghostdog Date: March 23, 2009 at 20:09:09 Pacific
Summary: Hey I solved the problem! And I found an error in the API programmer's reference unless I'm interpreting it incorrectly. When it gives an example of using a find/replace dialog it states the followin...
Summary: Hi, I am in need of some script help if possible. I have a few email databases that I hope to compile into one bulk database. My problem is I have a load of email addresses in txt files like: blahblah...