Prepare for your Next Interview
|
Welcome to the Geeks Talk forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
This is a discussion on How to copy the file from one location to another location using vbscript? within the QTP forums, part of the Software Testing category; Hi Friends, Please let me know how we can do the copy operation of a file using vbscript code? Regards, pradeep...
|
|||||||
|
|||
|
How to copy the file from one location to another location using vbscript?
Hi Friends,
Please let me know how we can do the copy operation of a file using vbscript code? Regards, pradeep |
| Sponsored Links |
|
|||
|
Re: How to copy the file from one location to another location using vbscript?
Hi,
Try this - dim filesys set filesys=CreateObject("Scripting.FileSystemObject") If filesys.FileExists("c:\sourcefolder\anyfile.html") Then filesys.CopyFile "c:\sourcefolder\anyfile.html", "c:\destfolder\" End If The FileSys.CopyFile method should work. Just remember to pass the Source and Destination paths correctly. Cheers...
__________________
Regards, V.Umesh Krishnan QA Consultant |
|
|||
|
Re: How to copy the file from one location to another location using vbscript?
Hi Pradeep,
Try fhis, This is for Copying a file (located in desktop) into a folder (located into desktop) Set Shell = CreateObject("WScript.Shell") Set FSO = CreateObject("Scripting.FileSystemObject") SourceDesktopPath = Shell.SpecialFolders("Desktop") + "\rajaputra.txt" 'we can use either & or + to concotinate the strings DestinationDesktopPath = Shell.SpecialFolders("Desktop") + "\Destination\" FSO.CopyFile SourceDesktopPath, DestinationDesktopPath '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' Arunsingh Rajaputra Software Test Engineer |
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Location of compressed old files. | nitin_gupta | Windows | 1 | 11-27-2007 07:36 AM |
| File location | BabieTech | Windows | 3 | 08-17-2007 07:49 PM |
| what is the location of the PGA | Geek_Guest | Oracle | 1 | 05-25-2007 07:16 AM |
| Copy test cases associated with requirements to new location | Geek_Guest | Test Director | 2 | 05-14-2007 05:19 AM |
| Functions were stored in different location. | tarunpandey4 | QTP | 2 | 04-20-2007 03:09 PM |