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 on multiple lines
Name: CrazyEd Date: November 28, 2008 at 07:05:28 Pacific OS: Winn NT CPU/Ram: Intel/1.5G
Comment:
I found the following code on this form to allow me to strip trailing spaces from rows in a file. Unfortunately it only seems to process the first row.
Can anyone provide any insight into what I need to modify to loop through a file and strip trailing spaces on every row.?
Sample Code -------------------------- @Echo Off SetLocal EnableDelayedExpansion For %%J in (desknet_FA_list_teams.txt) Do ( For /F "tokens=* delims=" %%A in (%%J) Do ( Set Row=%%A If not "!Row:~0,1!"=="#" ( :LOOP If "!Row:~-1,1!"==" " ( (Set Row=!Row:~0,-1!) & GoTo :LOOP) Set Row=!Row:tiplespawn 0=tiplespawn 1! Echo !Row!>> %%~cleanFAList.txt)))
Summary: Hi. i am trying to use a dos script to find and replace some text, maybe look up some values, for example, i have a dinamically generated text file containing information like this: product 1 product ...
Summary: I need to figure out a method to find and replace text within a text file. I have a file named, "myfile.txt" that has the following; testing=1 database=500 rules=30 I want the batch file to find datab...
Summary: Hello, I was trying to create a batchfile that will perform find and replace for a user defined string (both for find and replace) within a group of files. I havent had much luck. Any help would be gr...