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 and replace string in a file
Name: rsl Date: July 26, 2005 at 02:20:12 Pacific OS: Win XP CPU/Ram: 1gb
Comment:
Hi,
I want to find a string from a file and replace a string using a bat file. I have tried with findstr to find a string but not sure how to replace the string.
For example, in a file test.bat
string is HOST_NAME=a I want to replace this string value as HOST_NAME=b.
Summary: :: replace string in all files @echo off & setLocal EnableDelayedExpansion pushd c:\test for /f "tokens=* delims=" %%a in ('dir/s/b/a-d') do ( type nul > # for /f "tokens=* delims=" %%i in (%%a) do ( ...
Summary: I would like to know if there is a command similar to MUNGE that I found on this website: http://www.ss64.com/nt/ but it won't work on my newer computer. Is there a newer from of this command that wil...
Summary: i need to replace a key word in a text file through cmd script the record length of a record in the file is 2600. i am using below mentioned code for the same @echo off REM -- Prepare the Command Pro...