ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip   SiteMap shows list of All Categories in this site.
Google
 
Categories  >>  Software  >>  Testing  >>  Automation Testing  >>  QTP
 
 


 

 
 WinRunner interview questions  WinRunner Interview Questions
 Load Runner interview questions  Load Runner Interview Questions
 QTP interview questions  QTP Interview Questions
 Test Director interview questions  Test Director Interview Questions
 Rational TestSuite interview questions  Rational TestSuite Interview Questions
 Silk Test interview questions  Silk Test Interview Questions
 Automation Testing AllOther interview questions  Automation Testing AllOther Interview Questions
Question
i have .xls,.txt,.doc files are there (together). i want 
find only .xls file among them? how can we write function?
 Question Submitted By :: Narender Reddy Alala
I also faced this Question!!     Rank Answer Posted By  
 
  Re: i have .xls,.txt,.doc files are there (together). i want find only .xls file among them? how can we write function?
Answer
# 1
using the extention (.xls) in code..see below code
Here i open the file from mentioned path and read and write 
the values on that.


Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.OpenTextFile("c:\DIM.txt", 1, True) ' open to 
empty file and also use for open the file which is already 
created
   WriteLineToFile = f.ReadAll  'Read all  the file line to 
line
   msgbox WriteLineToFile

   Set MyFile1 = fso.CreateTextFile
("c:\kamesh.txt",True) 'create new empty file
   MyFile1.WriteLine WriteLineToFile ' Write all the stuf 
in created file
   MyFile1.Close
 
Is This Answer Correct ?    0 Yes 3 No
Kamesh
 
  Re: i have .xls,.txt,.doc files are there (together). i want find only .xls file among them? how can we write function?
Answer
# 2
Hi,

Please try with this script:

Set fileSysObj=CreateObject("Scripting.FileSystemObject")
folderPath="D:\"
If fileSysObj.folderexists(folderPath) then
	Set fileObj=fileSysObj.getfolder(folderPath)
	Set fileObjs=fileObj.files
	For Each FileName In fileObjs
		If FileName.type="Microsoft Excel Worksheet" then
			MsgBox("This is the excel file "&FileName.Name)
		End if
	next
else
	MsgBox("Folder does not exist")
End if
 
Is This Answer Correct ?    5 Yes 0 No
Uday Kumar_anem
 
 
 

 
 
 
Other QTP Interview Questions
 
  Question Asked @ Answers
 
what is framework in QTP? any one give me answer Wipro3
How we can merge the object repositories?say if we have 2 or 3 object repositories then how we can merge them?Is there any option in QTP to merge the object repositories?  2
when there is a task that gets repeated in multiple scripts what do you do in QTP? Ordain-Solutions2
suppose im having a string wipro123xyz i need to get the value 123 only from the string today 123 will be in the middle from tommorow it will be changing to front or back how to get the no if it changes continously? Wipro2
what is smart identification?  6
can any body tell me all of the release dates of QTP?????..... thanks in adv!  3
How to identify flash application when the qtp is not identifying the flash application objects.  2
Can Any One Write How to Write the Script for Child Objects  2
Use of environment variables?  3
I want to do Certification course in QTP. For this I request you to suggest the best Tutorial in PDF format, as i'm not in a possition to afford any 'Fee' to join in any institutions. Hence, if possible, kinldy mail PDF file to my mail-ID: chakri_avala@yahoo.co.in Regards, Chakradhar Yadav. IBM84
How can i count the list box elements in QTP ?using script plz explain me (Chandana) Wipro6
Tell me the situations where we will use Data Driven? Ordain-Solutions3
What is the another extension name of library file. If that is exist than what's the difference between them. Synechron2
how do u retrieve data from a database ? i.e. i want to retrieve 2nd record only from a database ? write code for this. by using ADODB connecton, RSOBJ and using a FOR loop we can retrieve all the records( ex: if we give query as select * from emp). but i want only 2nd record. so how to acheive this. Accenture2
An object is created, i dont know the methods available for that object, i want to find methods available for that object and use the required method. How i can do this??? HCL4
How do you create a library file  1
How can the expected image for a bitmap checkpoint be recaptured in QTP Ordain-Solutions1
Tell me the QTP Advantages and Disadvatages ?  1
How u call functions in QTP Function to calculate the length of characters in a word -  4
How to make Shared object repository in qtp 9.1 and 9.2?  2
 
For more QTP Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com