Copy a file in a folder and past the copy in another folder 
Author Message
 Copy a file in a folder and past the copy in another folder

Hi everybody,

How is it possible to copy a file from a folder and past the copy in
another folder.
If anybody would have a Sourcesnippet that would be great.

thanks in advance

David



Fri, 21 Oct 2005 11:08:58 GMT  
 Copy a file in a folder and past the copy in another folder
set fso=createobject("scripting.filesystemobject")
fso.copyfile "C:\Folder1\File.txt", "C:\Folder1\"

there are other attributes if you want to change the name, overwrite the
existing file, copying sets.  If you need any of those attributes, tons of
examples are on microsoft's script center, google searches, or post back.


Quote:
> Hi everybody,

> How is it possible to copy a file from a folder and past the copy in
> another folder.
> If anybody would have a Sourcesnippet that would be great.

> thanks in advance

> David



Fri, 21 Oct 2005 20:24:16 GMT  
 Copy a file in a folder and past the copy in another folder

Quote:

> set fso=createobject("scripting.filesystemobject")
> fso.copyfile "C:\Folder1\File.txt", "C:\Folder1\"

> there are other attributes if you want to change the name, overwrite the
> existing file, copying sets.  If you need any of those attributes, tons of
> examples are on microsoft's script center, google searches, or post back.

Hi

and not to forget the WSH 5.6 documentation that can be downloaded from here:
http://msdn.microsoft.com/downloads/list/webdev.asp

--
torgeir
Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of the 1328 page
Scripting Guide: http://www.microsoft.com/technet/scriptcenter



Sat, 22 Oct 2005 01:36:08 GMT  
 Copy a file in a folder and past the copy in another folder


Fri, 19 Jun 1992 00:00:00 GMT  
 Copy a file in a folder and past the copy in another folder
Quote:


>>set fso=createobject("scripting.filesystemobject")
>>fso.copyfile "C:\Folder1\File.txt", "C:\Folder1\"

>>there are other attributes if you want to change the name, overwrite the
>>existing file, copying sets.  If you need any of those attributes, tons of
>>examples are on microsoft's script center, google searches, or post back.

> Hi

> and not to forget the WSH 5.6 documentation that can be downloaded from here:
> http://msdn.microsoft.com/downloads/list/webdev.asp

> --
> torgeir
> Microsoft MVP Scripting and WMI, Porsgrunn Norway
> Administration scripting examples and an ONLINE version of the 1328 page
> Scripting Guide: http://www.microsoft.com/technet/scriptcenter



Sat, 22 Oct 2005 22:53:48 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Copy the files and sub folders to another folder

2. copy folder and copy files

3. Copy from folder to folder--how?

4. Copy bitmap from folder to folder

5. Copy C:\folder to A:\folder, the easy way

6. Copy files and folders VBScript

7. Check if a folder exist and copy files...

8. copy files in folder and subfolder question

9. Copy folder and files

10. Select file and copy to a folder..

11. Permission Denied when copying a file to the SendTo folder

12. Copying a folder and all its subfolders to the file server

 

 
Powered by phpBB® Forum Software