i need help splitting a txt file username:passsword format

webwhizz

BANNED
Joined
Apr 3, 2011
Messages
725
Reaction score
659
Hi, i have a txt file in this format username:ppassword and i need to split it up, so that i have a notepad txt file with just usernames and one with passwords, does any of you clever bhw people know how i can do that?
thanks
 
Paste them in Excel

Select the Column. Look for this option "Text to Column"

Select delimited, then select others and write ":" (without qoutes)

Ok and Finish :)
 
I can do that real quick if you cant manage it, send me a pm
 
Thanks for your advice my excel seems to be corrupt at mo, ive tried for a few hours with open office cal, hmm i need to finnd my windows office disc thanks
Paste them in Excel

Select the Column. Look for this option "Text to Column"

Select delimited, then select others and write ":" (without qoutes)

Ok and Finish :)
 
Quickly coded this in visual basic. Requires .NET Framework 4.0, splits using the delimiter ":", comes with the source if you want to make modifications or recompile.

Code:
        Dim array As String() = RichTextBox1.Lines
        Dim arraycount As Integer = array.Length
        Dim i As Integer = 0
        Do While i <> arraycount
            Dim arr As String() = array(i).Split(":")
            RichTextBox2.Text += arr(0) & vbCrLf
            RichTextBox3.Text += arr(1) & vbCrLf
            i += 1
        Loop
 

Attachments

Paste them in Excel

Select the Column. Look for this option "Text to Column"

Select delimited, then select others and write ":" (without qoutes)

Ok and Finish :)

lol that's exactly how i do for Faris :)
 
Thanks for this, its amazing just what i needed :)

Quickly coded this in visual basic. Requires .NET Framework 4.0, splits using the delimiter ":", comes with the source if you want to make modifications or recompile.

Code:
        Dim array As String() = RichTextBox1.Lines
        Dim arraycount As Integer = array.Length
        Dim i As Integer = 0
        Do While i <> arraycount
            Dim arr As String() = array(i).Split(":")
            RichTextBox2.Text += arr(0) & vbCrLf
            RichTextBox3.Text += arr(1) & vbCrLf
            i += 1
        Loop
 
Hi,
why are you using macros when it can be done with simple excel formulas
Try this, simple formulas
Simply select cell A1, Then copy all data from notepad and paste it into excel

Then click in cell C1 and type following formula =Len(A1)
then click in cell D1 and type following formula =Search(":",A1)
Now in cell E1 type =Left(A1,D1-1)
and In cell F1 type =Right(A1,C1-D1)
and Finally, Select cell E1 and F1 and drag them upto the bottom of the list
and You will get desired results

Hope,It solves your requirement.
In case you face any problem,feel free to PM me.

Thanks
 
Back
Top