Search found 2 matches
- 24 Nov 2008 05:43
- Forum: DOS Batch Forum
- Topic: Replace string with enviroment variable
- Replies: 4
- Views: 10243
Re: Replace string with enviroment variable
I'm not that good with these, but you can't do %1halfcommand%insidecommand%2halfcommand%... instead try: ECHO !TEXT:e:\home\plot=e:\home\plot\%username%! >>newFile.txt This don't work, it replace all test with the string (and not only c:\home\plot) Odder93, Try: Call ECHO %%TEXT:e:\home\plot=e:\hom...
- 14 Nov 2008 06:14
- Forum: DOS Batch Forum
- Topic: Replace string with enviroment variable
- Replies: 4
- Views: 10243
Replace string with enviroment variable
Hi to all. I've this problem, i need to replace a string with enviroment variable on text file. This is my source code, but i don't know how replace env. variable : set DIR=c:\TEMP SET FILEPATH=e:\home\ SET FILE=e:\home\config.pro SET FNAME=config.pro CALL :PROCESS GOTO :EOF :PROCESS pushd %FILEPATH...