CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2001
    Posts
    29

    Editing a txt file

    I have a txt file that is a list of email addresses, in a singal coulum.

    ex.

    [email protected]
    [email protected]

    I want to open the file and pull all of these together and seperate them with a ";".
    To look like this:
    [email protected];[email protected]

    Thanks,

    BMLekki
    [email protected]


  2. #2
    Join Date
    May 2000
    Location
    New York, NY, USA
    Posts
    2,878

    Re: Editing a txt file

    dim sLine as string
    dim sFinalString as string
    Open "c:\temp\temp.txt" For Input As #1 'to read from
    Do While Not EOF(1)
    Line Input #1, sLine
    sFinalString = sFinalString & ";" & sLine
    Loop
    Close #1

    Now sFinalString contains all your strings separated by ;

    Iouri Boutchkine
    [email protected]
    Iouri Boutchkine
    [email protected]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured