find and replace batch to *.txt

December 28, 2009 at 00:42:25
Specs: Windows XP
Hello All
i really request a very simple batch in dos but i am not familier
I want to replace a "Post" with "Post (Tab character)" for *.txt in the same folder with the .bat file and save it with the same name again.
How can i do that?? please help

See More: find and replace batch to *.txt

Report •

December 28, 2009 at 04:24:32
@echo off > newfile & setLocal enableDELAYedexpansion

for /f "tokens=* delims= " %%a in ('dir/b *.txt') do (
del newfile
for /f "tokens=* delims= " %%t in (%%a) do (
set S=%%t
set S=!S:Post=Post !
>> newfile echo !S!
copy newfile "%%a"

Helping others achieve escape felicity


Report •

December 29, 2009 at 00:54:48
Thank you very mutch

Report •

Related Solutions

Ask Question