i have .xls,.txt,.doc files are there (together). i want
find only .xls file among them? how can we write function?

Answer Posted / uday kumar_anem

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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

I opened gmail login into gmail and i have to save (Pass or move) all the mail into notepad please give me code Thanks of all

1719


Can any one tell me about "Mapping Repository Parameter Values" and why we use it....??How to use it???Please, tell the preconditions also...........???? Thanks in Advance

1725


Hi, my requirement is to make a query in SQL using QTP. And i have to get the results of that query and i have to use those results for future testing. I created a driver but i dont know the code for using this Driver. please help me by providing the solution for y requorement

1866


1.How do u prepare the test suits in QC? 2.How do u convert requirements to test plan in QC?

1699


How should I click on the right click menu objects When I trying to add the object properties to the OR.It is showing only Window(Window).Not all the objects of the window. Also while recording I found No script. How to solve this>.

1744


In application which areas to be automated and what kind of situation will be take? using QTP? Plz give me the clear answer

2144


Can anyone pls tell me how to do action parameterization (input and output parameters) with respect to login window and insert order of flight reservation window in detail( pls give a clear step by step explanation with example) anyone please. Will be very thankful to u

1549


Explain different types of checkpoints?

780


How can you exit from an action?

797


can any boby tell me what is method or steps to connect the remote desk top by using QTP 9.2 version?

1804


What is the file extension of the code file and object repository file in QTP?

846


hi nani my doubt is how does qtp process metrix related to software process.

1759


Shall we add Local Repository to shared object repository,if yes,how we add

6655


How extensive or customized are the server logging and reporting requirements; are they considered an integral part of the system and do they require testing?

774


How can you handle exceptions in qtp?

758