Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Will FSO.Copy work w/o moving the files back & forth over network?

Status
Not open for further replies.

dbMark

Programmer
Apr 10, 2003
1,515
0
0
US
I don't have enough familiarity of how the FileSystemObject works under the hood, so to speak, so I'll ask here...

I know that if I use the DOS COPY or XCOPY commands to copy a file from one folder on a server to another folder on the same server, it will pull the file over to my workstation and then copy it right back over the network connection to the specified folder. I have numerous large files and I can't tie up the server that way. So... If I instead use the FSO.Copy command and specify that it copy the file to another folder on the same server will it accomplish it without sending the file back and forth over the network connections?

Code:
Const OverwriteExisting = True
Set objFSO = CreateObject("Scripting.FileSystemObject")
objFSO.CopyFile "\\MyServer\FolderA\my.txt" , "\\MyServer\FolderB\", OverwriteExisting
My primary goal is to reduce network congestion and consequent time delays. If FSO won't do it, what will? I'm still trying to (1) run it from a workstation and (2) use it for the future when I begin using a Filer rather than a Server.
 
No, FSO won't do it. AT least not whilst you need to run your code on your workstation.
 
I think any workstation based utility will stream the file through the workstation.

Jeff
[small][purple]It's never too early to begin preparing for [/purple]International Talk Like a Pirate Day
"The software I buy sucks, The software I write sucks. It's time to give up and have a beer..." - Me[/small]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top