Another TPIPE question

Jun 3, 2008
106
1
Temecula, CA
I have a file that looks a bit like an INI file, but isn't. It has the following three lines at the end of the file:

[START_BACKUP_LIST]
!!LIST
[END_BACKUP_LIST]


I need to modify the line with !!LIST in it and replace it with a line containing text stored in the _SOURCE environment variable. In my test case, _SOURCE is set to u:\Aurora\Builds\3.1\3.1.75.0\CD. What it should look like is:

[START_BACKUP_LIST]
u:\Aurora\Builds\3.1\3.1.75.0\CD

[END_BACKUP_LIST]

So this is what I tried:

tpipe /input=%TEMP%\CreateISO.ibb /replace=0,0,0,0,0,0,0,0,0,!!LIST,%@quote[%_SOURCE%] /output=%TEMP%\CreateISO.ibb

Nope! This time I get an error:

TPIPE: \DDD must start with the decimal digit 0, 1 or 2 (Leading zeros are required). Valid range is 000-255

Huh? What is it talking about? (BTW, TEMP is set to C:\Temp.)
 

samintz

Scott Mintz
May 20, 2008
1,322
12
Solon, OH, USA
The issue with this use case is the backslashes in the file path. If you double the back slashes, it will operate as you expect.
Code:
SET _SOURCE=u:\\Aurora\\Builds\\3.1\\3.1.75.0\\CD
 
Jun 3, 2008
106
1
Temecula, CA
I added this line prior to the TPIPE to solve the double backslash issue:

set _SOURCE=%@replace[\,\\,%_SOURCE]

Now TPIPE runs and doesn't report an error, but it doesn't actually make a change. Is there something funky about the value of !!LIST for the search string?
 
Aug 3, 2016
368
9
Netherlands
Nothing wrong with your commands/syntax (just tested this)
Maybe the CreateISO.ibb file has the ReadOnly attribute set? TPIPE will give you no feedback (at all) in that case.
.
 
Jun 3, 2008
106
1
Temecula, CA
It fails with you but not with others. This could be related to OPTION / Startup / CMD.EXE delayed expansion, which could do something with the exclamation marks.
That's an interesting theory. Well, my likely relevant settings in OPTION are: CMD.exe delayed expansion (!var!) is unchecked, and Duplicate CMD.exe bugs is checked. Also, I'm using TCC version 16, not the latest, which might be another factor.