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
Can we record an application running on a remote machine using qtp?
How often were they executed?
How to run an integrated test scenario using Multiple Actions? How to use the QTP Step Generator?
Hi Guys, I want to place all of my values which i am getting it from a loop in to a global shee. For that i had written the script like this For i = 1 to ECOs-1 ECO = List(i).GetROProperty("innertext") DataTable.AddSheet("ECOList") DataTable.GetSheet("ECOList").AddParameter "ECOList",ECO AbortECO = DataTable.GetSheet("ECOList").GetParameter ("ECOList").Value msgbox AbortECO DataTable.GetSheet("ECOList").SetNextRow Using the above script, whenever the loop iterates it is creating new column "ECOLIST" in the sheet called "ECOLIST". It means, the values are displaying in the column wise even though i added the script " DataTable.GetSheet("ECOList").SetNextRow" . The cursor is not moving to the next line. Anybody help me out how to pass the values from script to the excel(Global/Local) sheet. Pls let me know @ nbabu11@gmail.com if you are not clear about the question.
An action has both shared and local OR associated with it and both have the same object in them. In the test which one will be considered?
Why we use QTP ,We can use other tools like WR OrSilktest What r the options in Qtp that WR and Swilktest Does not have.
What is post recovery scenario?
Explain the Different types of QTP test assets and their extensions?
How to export quicktest professional results to an .xls file?
How to remove associated function library?
Explain the N-tire structure(process) for Funds Transfer ( means give N ways to funds Transfer in an Application)
What are the types of data tables in qtp?
How will you check that your test cases covered all the requirements?
What is meant by Output Value in UFT?
Why to use descriptive programming?