|Well, I for somereason can't get change to work. I've never used it before, so I don't know the syntaxes.|
I am able to set "(Host=XXXX)(Port=1500)" or any variation to a variable. the only part not working is the change command that you supplied. ie, I done think that this is going to get done, you need to download sed. A program called Quick Batch File Converter will convert the batch file to an exe. You can compile sed with the batch file and hand it out as one exe.
The only downfall is that it's detected as a false positive by some anti-virus software.
Here's what I was able to get:
FOR /f "skip=3 tokens=2,3,4 delims=)" %%a IN (FileName.txt) DO (
IF "%Var: =%"=="(Host=HXXX)(Port=1500)" (
Copy "%Var%" zzzz
CHANGE zzzz "%Var%" "(Host = MAAA)(Port = 2555)"
Can I put a question here?