I want to get the input from the user let, say (chand) then i will delete that chand line in the "d:\test.txt"..... The output of the "test.txt" should be
set objfso = CreateObject("Scripting.FileSystemObject") Set objread = objfso.opentextfile("d:\test.txt") set objwrite = objfso.CreateTextFile("d:\temp.txt",2) Do Until objread.AtEndofStream str = objread.ReadLine itemp = InStr(str,",") name = Left(str , itemp-1) number = Mid(str , itemp+1 ,Len(str)-1 ) msgbox name msgbox number
if name = "chand" then ' Here Chand is the user input str = objread.ReadLine msgbox "Found" End if
objwrite.WriteLine str
loop Set objread = Nothing Set objwrite = Nothing Set objread = objfso.opentextfile("d:\temp.txt") strall = objread.ReadAll objread.close Set objwrite = objfso.CreateTextFile("d:\test.txt") objwrite.Write strall So far i finished using one temp text file for it... I want without using that temp file edit the "test.txt".... Is there any way to do it???