Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to concatenate 2 text files
#1
Solved: 11 Years, 4 Months ago
Hi All,

Can you pls help me on the below scenario?

I am trying to capture the Text from 2 different web pages and stored in a Text file. I used the following code
1st FileSadWeb page1)
--------
Code:
sVar=br(br).pg(pg).object.DocumentElement.Innertext
set oFSO=CreateObject("scripting.Filesystemobject")
set oFile1=oFSO.CreateTextFile("C:\temp\file1.txt",ForWriting,True)
oFile1.write sVar
oFile1.close
2nd FileSadweb page2)
-------
Code:
sVar2=br(br).pg(pg).object.DocumentElement.Innertext
set oFile1=oFSO.CreateTextFile("C:\temp\file2.txt",ForWriting,True)
oFile2.write sVar2
oFile2.Close

Now, I have to concatenate these two files and save in a different file. I need to remove extra spaces as well.

Can you please provide me the solution to do this?

Earliest reply is highly appreciated!
Thanks,
kishore
Reply


Messages In This Thread
How to concatenate 2 text files - by kkishore12345 - 12-18-2008, 11:06 AM
RE: How to concatenate 2 text files - by Ankur - 12-18-2008, 05:34 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Need to Validate Text filed is blank after clicking on the Text box balak89 3 4,893 09-13-2015, 12:06 AM
Last Post: ADITI1992
  QTP Should open files(say txt files) it can be n number from a folder. Shiv Y 1 2,784 12-18-2013, 01:45 AM
Last Post: mlkrqtp
  I am trying to extract text from a webelement but it is generating blank text scenari excellentpawan 2 4,663 08-13-2013, 08:37 PM
Last Post: excellentpawan
  How do I compare 2 text files? avanthika 4 15,018 12-10-2011, 09:03 PM
Last Post: Arul
  how to find a particular text in a text string pjavvaru 3 17,061 06-04-2010, 08:49 PM
Last Post: jsknight1969

Forum Jump:


Users browsing this thread: 1 Guest(s)