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

How to? Convert a UNIX file to PC file

Discussion in 'Support' started by Charles G, Sep 21, 2016.

  1. Charles G

    Joined:
    Apr 2, 2011
    Messages:
    1,027
    Likes Received:
    0
    TPIPE /input=inputfile.txt /output=outputfile.txt

    then not sure what else to add. I need convert line endings of

    |10 |0

    to

    |13 |10
     
  2. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,970
    Likes Received:
    30
    I don't recall \0 (a NUL character?) being part of Unix line-enders.

    Anyway, have a look at TPIPE's \EOL
     
  3. Charles G

    Joined:
    Apr 2, 2011
    Messages:
    1,027
    Likes Received:
    0
    I got the line endings from my programmers editor - Multi-Edit.....

    MEW

    Will check on tpipe's EOL....
     
  4. Charles Dye

    Charles Dye Super Moderator
    Staff Member

    Joined:
    May 20, 2008
    Messages:
    3,311
    Likes Received:
    39
    ... Unless it's UTF-16, and that 'NUL' is really the high byte of the line feed?
     
    mfarah likes this.
  5. oph

    oph

    Joined:
    Jun 28, 2008
    Messages:
    25
    Likes Received:
    0
    I am using

    for %x in (%1) tpipe /input=%x /output=%x /eol=3,2,0 /simple=13
     
  6. Charles G

    Joined:
    Apr 2, 2011
    Messages:
    1,027
    Likes Received:
    0
    Specifying the same file for input and output - seems to be wrong? Does tpipe handle that correctly?

    Here is what seems to work for me, so far....

    Code:
    TPIPE /input=C:\TCMD\WinApp2_Ini\Winapp2.ini /eol=0,2,0 /output=C:\TCMD\WinApp2_Ini\Winapp2.MSD
    
    The Winapp2.ini is from a github project.......
     
  7. oph

    oph

    Joined:
    Jun 28, 2008
    Messages:
    25
    Likes Received:
    0
    for %x in (%1) tpipe /input=%x /output=%x /eol=3,2,0 /simple=13

    works.

    Of course, one can lost the file is there is a problem, but I am dealing with text files easily recovered.

    The files are generated in Linux and copied to DOS, the original files remain in Linux disk.

    The reverse is

    for %x in (%1) tpipe /input=%x /output=%x /eol=3,0,0 /simple=13

    For Mac files to DOS

    for %x in (%1) tpipe /input=%x /output=%x /eol=1,2,0 /simple=13

    The reverse

    for %x in (%1) tpipe /input=%x /output=%x /eol=2,1,0 /simple=13

    Regards.
     

Share This Page