Script to copy a file and folder from one location to other in QTP
Script for moving a file from One location to Another location in QTP?
Dim f
Set f = CreateObject("Scripting.FileSystemObject")
f.MoveFile "D:\laxmi.txt", "C:\"
Msgbox "File Moved"
Above script is for moving a text file(laxmi)from D drive to C drive.
The MoveFile method takes two parameters,the source file and the destination.
Syntax:object.MoveFile (source,destination)
My Article in Ezine Articles
Data Driven Using Notepad
Script to copy a file and folder from one location to other in QTP
SQL Queries Collection
Movie Songs Lyrics
Manual Testing Faqs
How to Move a File From One Location to Another in QTP?
How to Copy a File and Folder From One Location to Other in QTP?
Script for copying a file from One Folder to Another Folder in QTP?
Dim f
Set f = CreateObject("Scripting.FileSystemObject")
f.CopyFile "C:\lakshmi.txt", "D:\"
Msgbox "File Copied"
Above script is for copying a text file(lakshmi)from C drive to D drive.
The CopyFile method,performs the file copy operation.
The CopyFile method takes two parameters,the source file and the destination.
My Article in Ezine Articles
Data Driven Using Notepad
Script to Create Text File
Script to Delete File
Script to Copy a folder from one drive to other in QTP.
Dim f
Set f = CreateObject("Scripting.FileSystemObject")
f.CopyFolder "D:\Test2", "C:\"
Msgbox "Folder Copied"
Above script is for copying a Folder(Test2)from D drive to C drive.
The CopyFolder method,performs the folder copy operation.
The CopyFolder method takes two parameters,the source folder and the destination
QTP Script to Get Names of Subfolders in a Folder.
SQL Queries Collection
Movie Songs Lyrics
Script to Create Folder
My Article in Ezine Articles
My Article got published in Ezine Articles.
Check My First Article in EzineArticles.Com.
I WISH U ALL A VERY HAPPY AND PROSPEROUS NEW YEAR !!!
Software Testing Faqs
Data Driven Testing in QTP
Datatable Methods
QTP Script for different Controls
Script to Capture Tooltip
VBScript Functions With Examples
QTP Script to Check All Checkboxes in a Webpage
Data driven testing using datatable
QTP Script to Export Database Data to Excel Sheet
Import data from database to datatable
Script to export database data to excel sheet in qtp.
Dim con,rs
Set con=createobject("adodb.connection")
Set rs=createobject("adodb.recordset")
con.provider="microsoft.jet.oledb.4.0"
con.open"d:\db.mdb"
rs.open"select*from EMP",con
Set ex=createobject("Excel.Application")
Set a=ex.workbooks.open("D:\Lak.xls")
Set b=a.worksheets("sheet1")
i=1
Do While Not rs.EOF
b.cells (i,1).value=rs.fields("empno")
b.cells(i,2).value=rs.fields("empname")
b.cells(i,3).value=rs.fields("empsal")
rs.movenext
i=i+1
Loop
a.save
a.close
Above written script is for exporting database data to already exisiting excel sheet.
Database has a table called EMP with columns empno,empname,empsal.The values of these columns are exported to excel sheet.
Excel Sheet Creation and Writing Data Into It
Data Driven Using Excel Sheet
Data Driven Using Notepad
SQL Queries Collection
Movie Songs Lyrics