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

No comments:

Related Posts Plugin for WordPress, Blogger...

Fun and Knowledge