Make a batch file Open a text doc and edit it

September 24, 2009 at 12:13:50
Specs: Windows Vista
Hi guys im trying to make a batch Open a text
doc and edit what it says in it and i need it to
have choices please help

See More: Make a batch file Open a text doc and edit it

Report •


#1
September 25, 2009 at 00:39:27
@echo off > newfile & setLocal enableDELAYedexpansion

set /p old= old txt ?
set /p new= new txt ?

for /f "tokens=* delims= " %%a in (myfile) do (
set str=%%a
set str=!str:%old%=%new%!
>> newfile echo !str!
)


=====================================
Helping others achieve escape felicity

M2


Report •

#2
October 2, 2009 at 14:27:20
If i give you the names of the folder and the folder location can
you make the coding for me and i make the batch

Report •

#3
October 3, 2009 at 06:46:07
Not quite clear but if the file is not in the same directory as the batch, add this as your second line:

pushd c:\myfiles


=====================================
Helping others achieve escape felicity

M2


Report •

Related Solutions


Ask Question