Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Another TPIPE question

Jun
137
3
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.)
 
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
 
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?
 
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.
.
 
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.
.

I appreciate the attempt, but no, it's not read only.
 
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.
 
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.
 
Back
Top
[FOX] Ultimate Translator
Translate