help with a vbscript to copy files to a remote computer and overwrite a file if it is already there…

15 pts.
Tags:
VBScript
VBScript Functions
I already have the script to copy the files over and it is working on my local pc. All pc's are on the same domain. Set FSO =CreateObject("scripting.FileSystemObject") FSO.CopyFile "\SAN1Files*", "c:Metatr~1" ,True

Answer Wiki

Thanks. We'll let you know when a new response is added.

I believe that the problem with your code is the source file path. You have a *. The syntex is wrong. You either need to specify the file name with extension, or use a wild card like *.*… or *.txt.

Set FSO =CreateObject(“scripting.FileSystemObject”)
FSO.CopyFile “\\SAN1\Files\File.Txt”, “c:\Metatr~1” ,True

Set FSO =CreateObject(“scripting.FileSystemObject”)
FSO.CopyFile “\\SAN1\Files\*.*”, “c:\Metatr~1” ,True

Set FSO =CreateObject(“scripting.FileSystemObject”)
FSO.CopyFile “\\SAN1\Files\*.Txt”, “c:\Metatr~1” ,True

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • Dlynn
    Thanks Raedyn
    15 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: