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
Showing posts with label file system object. Show all posts
Showing posts with label file system object. Show all posts
How to Copy a File and Folder From One Location to Other in QTP?
QTP Script To Delete File From Particular Location
QTP Script to delete particular file from particular location.
Set f = CreateObject("Scripting.FileSystemObject")
f.DeleteFile("D:\file1.txt")
The Above Script will remove(delete)notepad naming file1(text file)from D drive.
QTP Script To Create File
Data Driven Testing Using Notepad
Subscribe to:
Posts (Atom)