1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Another TPIPE question

Discussion in 'Support' started by MickeyF, Dec 7, 2016.

  1. MickeyF

    Joined:
    Jun 3, 2008
    Messages:
    76
    Likes Received:
    1
    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.)
     
  2. samintz

    samintz Scott Mintz

    Joined:
    May 20, 2008
    Messages:
    1,201
    Likes Received:
    11
    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
    
     
  3. MickeyF

    Joined:
    Jun 3, 2008
    Messages:
    76
    Likes Received:
    1
    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?
     
  4. MaartenG

    Joined:
    Aug 3, 2016
    Messages:
    355
    Likes Received:
    8
    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.
    .
     
  5. MickeyF

    Joined:
    Jun 3, 2008
    Messages:
    76
    Likes Received:
    1
    I appreciate the attempt, but no, it's not read only.
     
  6. Christian Albaret

    Joined:
    Jul 1, 2008
    Messages:
    156
    Likes Received:
    1
    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.
     
  7. MickeyF

    Joined:
    Jun 3, 2008
    Messages:
    76
    Likes Received:
    1
    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.
     

Share This Page