gaiaplay Posted October 10, 2009 Share Posted October 10, 2009 (edited) Thanks, Gaiaplay Edited April 20, 2010 by gaiaplay Link to comment Share on other sites More sharing options...
FuryCell Posted October 10, 2009 Share Posted October 10, 2009 (edited) Did you see the Fileread functions in the help file?Heres Some sample code to you started. $Handle=FileOpen(".\Dummy.txt",0) While 1 $Line=FileReadLine($Handle) If @Error=-1 then ExitLoop $Array=StringSplit($Line,":") $C1=$Array[1] $C3=$Array[3] MsgBox(0,"Column 1",$C1) MsgBox(0,"Column 3",$C3) WEndEdit:Added Code Edited October 10, 2009 by P5ych0Gigabyte HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code. Link to comment Share on other sites More sharing options...
Quual Posted October 10, 2009 Share Posted October 10, 2009 This will do it Global $OriginalFile = "c:\files\dummy.txt" Global $NewFile = "c:\files\dummy2.txt" Doit() Func Doit() $hIn = FileOpen($OriginalFile ,0) $hOut = FileOpen($NewFile,1) While True $sline = FileReadLine($hIn) If @error Then ExitLoop $vSplit = StringSplit($sLine,':') If UBound($vSplit) > 3 Then FileWriteLine($hOut,$vSplit[1] & ':' & $vSplit[3] ) WEnd FileClose($hIn) FileClose($hOut) EndFunc Link to comment Share on other sites More sharing options...
gaiaplay Posted October 10, 2009 Author Share Posted October 10, 2009 TY guys you are great. I now have an idea how to handle this one. THANKS once again. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now