Dear All,I need you to create a batch file that will search in txt file this txt file have values like this
# Forms applet parameter: URL path to Forms ListenerServlet
serverURL=/forms/lservlet
# Forms applet parameter
codebase=/forms/java
# Forms applet parameter
imageBase=codebase
# Forms applet parameter
width=300%
# Forms applet parameter
height=300%
# Forms applet parameter
separateFrame=false
# Forms applet parameter
splashScreen=
# Forms applet parameternow i need a help to access this file and search for this value (imageBase) and then change it for something like this (xxxxxx)
imageBase=xxxxxx
plz help and advice
@echo off > newfile & setLocal enableDELAYedeXpansion for /f "tokens=* delims= " %%a in (myfile) do ( set S=%%a if !S:~0^,9! equ imageBase ( >> newfile echo.imageBase=xxxxxx ) else ( >> newfile echo.!S! ) )
=====================================
Helping others achieve escape felicityM2
heloo Mechanix2Go, first thank you very much for reply
I forgot to told you where is this file exist and what is the file
name
path: D:\DevSuiteHome_1\forms\server\formsweb.cfg
file name : formsweb.cfg
plz i need help again
and thanks again for your reply
hi friends, i realy need littel more help here
Hopefully, with a little effort, you can tailor the script to your path & filename.
=====================================
Helping others achieve escape felicityM2
plz Mechanix2Go provide me by example of my question
You're not trying very hard. Where I have: myfile you put:
D:\DevSuiteHome_1\forms\server\formsweb.cfg
=====================================
Helping others achieve escape felicityM2
this what i did Mechanix2Go i change myfile to : D:\DevSuiteHome_1\forms\server\formsweb.cfg
@echo off > newfile & setLocal enableDELAYedeXpansion
for /f "tokens=* delims= " %%a in (D:\DevSuiteHome_1\forms\server\formsweb.cfg) do (
set S=%%a
if !S:~0^,9! equ imageBase (
>> newfile echo.imageBase=codebase
) else (
>> newfile echo.!S!
)
)
no news, plz could you help me more
What did you get in newfile?
=====================================
Helping others achieve escape felicityM2
i get nothing, it's empty file plz Mechanix2Go i don't need to create a new file i just need to
to change some lines in this file D:\DevSuiteHome_1\forms\server\formsweb.cfgso plz help to change this line and if i have another lines in this
file where i can put it in your codeplz more help & andvice
[1] I see nothing wrong with your script. [2] Yes, you **DO** need a new file. A batch can NOT read and write a file at the same time.
[3] Are you getting any error?
=====================================
Helping others achieve escape felicityM2
Hi Mechanix2Go i don't no how the error should be look like, but i will tell you what i can see, after i create your script in this folder :
D:\DevSuiteHome_1\forms\server
and double click the batch file i see a black blank dos window
this window stay open for while and then disapear.
After that i double click my file formsweb.cfg and no newsso plz plz more help
Forget clicking. Run it from the prompt.
=====================================
Helping others achieve escape felicityM2