how to find the textfile in the folder and copy file from one
folder to another folder useing parameterigation in QTP



how to find the textfile in the folder and copy file from one folder to another folder useing para..

Answer / b.hari babu

Function Replacinfile(SourceFile,Destination File)
Set Fso=CreateObject("Scripting .FilesystemObject")
If Fso.Exisit(SourceFile) Then
Fso.CopyFile(SourceFile,Destination File)
End If
End Function
Call Replacinfile(Sourc Filepath,Destination Filepath)
SourceFile=Sourc Filepath
Destination File=Destination Filepath

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More VB Script Interview Questions

Explain what is loose binding? Why is it not a good practice to use it?

0 Answers  


What is the purpose of on error resume next statement?

0 Answers  


In our application qtp unable to indentify the menu items,we tried number of times to add objetcs into object repository but fail. through normal recording mode only objects going to add into repository but while running same recording script qtp showing a error like " unable to indentify the object". in repository there is no any properties and pro values for that object and also i tried with virtual object config also unable to find the object in application and in repository. Then what i have to do to identify menu objects????? can anybody hell me pls..............

2 Answers   Blue Star,


Is VB Script Case sensitive or Case insensitive?

0 Answers  


How are values assigned to the variables in the vbscript language?

0 Answers  


Which function is used to perform string comparison?

0 Answers  


where can i learn VB scripint ?

0 Answers   Satyam,


i have developed the below QTP script to count the no of items available in the web list "Select a product" in www.bankrate.com and also want to print what are the items??? can any one help me to rectify the below script??? SystemUtil.Run "iexplore.exe","www.bankrate.com" a=Browser("title:=Mortgage Rates Credit Cards Refinance Home CD Rates by Bankrate.com").page("title:=Mortgage Rates Credit Cards Refinance Home CD Rates by Bankrate.com").Weblist("name:=select").GetTOProperty("items count") msgbox a Dim List() ReDim List(a-1) For i = 1 To a List(i-1)=Browser("title:=Mortgage Rates Credit Cards Refinance Home CD Rates by Bankrate.com").page ("title:=Mortgage Rates Credit Cards Refinance Home CD Rates by Bankrate.com").Weblist("name:=select").GetItem(i) Print List(i-1) Next

1 Answers  


What is the use of option explicit statement?

0 Answers  


Which command is used for writing text on a page?

0 Answers  


Explain the operator precedence in vb script?

0 Answers  


How can constants be declared in the vbscript language?

0 Answers  


Categories