[windows2000] Re: Copying a file to a network location

  • From: "Ray at work" <listray@xxxxxxxxxx>
  • To: <windows2000@xxxxxxxxxxxxx>
  • Date: Wed, 12 May 2004 16:04:19 -0400

Set oFSO = CreateObject("Scripting.FileSystemObject")
oFSO.CopyFile "C:\File.txt", "\\server\share\"
Set oFSO = Nothing

A common mistake is not using the \ at the end of the target path.  If you
don't, the last section of the path is interpreted as the target filename.
If you're not going to specify the filename, you have to end the path with
\.  Of course, without seeing you're code, I'm just throwing out guesses...

Ray at work

> -----Original Message-----
> From: windows2000-bounce@xxxxxxxxxxxxx 
> [mailto:windows2000-bounce@xxxxxxxxxxxxx] On Behalf Of 
> Freitas, Eduardo

> Sorry, I forgot to mention that I want to do that from a 
> vbscript.... : )
> 
> From: Freitas, Eduardo [mailto:Eduardo.Freitas@xxxxxxxxxxxxx] 
> 
> Does anyone know how can I copy a file from a remote machine 
> to a UNC? 


********************************************************
This Weeks Sponsor StressedPuppy.com Games
Feeling stressed out? Check out our games to
relieve your stress.
http://www.StressedPuppy.com
********************************************************
To Unsubscribe, set digest or vacation
mode or view archives use the below link.

http://thethin.net/win2000list.cfm

Other related posts: