09-07-2011, 06:50 PM
Hi Friends
i want back up of my scripts in qc and want to save in local pc.
here is the code for copying between folders in the local pc
Kindly helps in this regard
i want back up of my scripts in qc and want to save in local pc.
here is the code for copying between folders in the local pc
Code:
dim filesys, newfolder, newfolderpath
Dim dateformat
dateformat = replace(now, "/", "-")
dateformat = replace(dateformat, ":", "-")
msgbox dateformat
newfolderpath = "D:\Sathiya\Backup\"&dateformat
' dataformat is just to identify on which date back up is taken.
set filesys=CreateObject("Scripting.FileSystemObject")
If filesys.FolderExists("D:\sathiya\BNFS\sathiya\Qtp practice\comparing two excel sheet\Comapring_two_excel_sheets" ) Then
Set newfolder = filesys.CreateFolder(newfolderpath)
filesys.CopyFolder "D:\sathiya\BNFS\sathiya\Qtp practice\comparing two excel sheet\Comapring_two_excel_sheets", newfolderpath
End If
Kindly helps in this regard