batch file to change text file in windows

Home Forums Scripting DOS Command Shell batch file to change text file in windows

This topic contains 2 replies, has 3 voices, and was last updated by Avatar goshen.levy 4 years, 2 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • Avatar
    Peterpeter
    Member
    #165831

    Hi everyone,
    Hopefully you guys can help me with my small issue. To clear my problem I am working on a Windows machine and need a batch file to change a text file.

    My problem is:
    I get a .txt file with another programm which looks like this the characters allways stay the same.
    Code:

    3539
    78060031
    523 )
    [/CODE]

    I’d like to write a batch wich converts the text.txt to

    [CODE]
    353978060031523
    [/CODE]

    thank you in advance for your help :)
    [CODE]
    3539
    78060031
    523 )
    [/CODE]

    I’d like to write a batch wich converts the text.txt to

    353978060031523
    [/CODE]

    thank you in advance for your help :)
    [CODE]
    353978060031523
    [/CODE]

    thank you in advance for your help :)

    Avatar
    goshen.levy
    Member
    #391186

    Done thx to noone here :)

    for /f “tokens=*” %%a in (textfile3.txt) do (
    set “concatenate_string=!concatenate_string!%%a”
    )

    echo !concatenate_string! > “text.txt”

    FOR /F “usebackq delims=” %%a IN (“text.txt”) DO (
    Set “line=%%a” & echo !line: =!
    )>”text1.txt”
    set str>> “%OutputFile%” echo.!s:~24!
    text1.txt
    [/CODE][CODE]
    for /f “tokens=*” %%a in (textfile3.txt) do (
    set “concatenate_string=!concatenate_string!%%a”
    )

    echo !concatenate_string! > “text.txt”

    FOR /F “usebackq delims=” %%a IN (“text.txt”) DO (
    Set “line=%%a” & echo !line: =!
    )>”text1.txt”
    set str>> “%OutputFile%” echo.!s:~24!
    text1.txt
    [/CODE]

    Avatar
    Ossian
    Moderator
    #190945
    Peterpeter;n493482 wrote:
    Done thx to noone here :)

    Well, FFS. No reply in 17 whole minutes and you are complaining about the lack of support. Really you should DEMAND a REFUND of your membership fee.
    (Oh, I forgot… people give their free time to help others, and we don’t charge a membership fee)

    Please consider a bit of politeness next time you post or your stay here will be very short.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.