Computing.Net > Forums > Programming > VB Script needed to Copy files

VB Script needed to Copy files

Reply to Message Icon

Original Message
Name: vinayag
Date: December 13, 2006 at 03:31:15 Pacific
Subject: VB Script needed to Copy files
OS: Windows XP
CPU/Ram: 512 MB
Model/Manufacturer: Intel
Comment:

Hi,I need a VB Script to copy a set of files from one location to another.
Please help me.

Regards,
Vinayaga.


Report Offensive Message For Removal


Response Number 1
Name: MrBedo
Date: December 13, 2006 at 04:08:35 Pacific
Reply: (edit)

At it's simplest:

Dim FSO

Set FSO = CreateObject("Scripting.FileSystemObject")

FSO.CopyFile "\\file to be copied path", "\\destination directory"


But your best bet would be to simply Google your question, there's a mountain of help and examples out there.


Report Offensive Follow Up For Removal

Response Number 2
Name: tonysathre
Date: December 13, 2006 at 04:31:17 Pacific
Reply: (edit)

Does it have to be a VBScript?

@echo off
net use t: \\computername\sharename
xcopy /y /e c:\folder t:> nul
echo copy complete
net use t: \\computername\sharename /delete
pause

"Computer security." — Oxymoron


Report Offensive Follow Up For Removal

Response Number 3
Name: nem0
Date: December 13, 2006 at 13:08:40 Pacific
Reply: (edit)

You can write a batch file.

@echo on
xcopy /d /y "xxxxxxxxxx" "yyyyyyy"

x= path for the file(s)
y= path for the destination

Hope that helps.


Report Offensive Follow Up For Removal

Response Number 4
Name: nem0
Date: December 13, 2006 at 13:09:24 Pacific
Reply: (edit)

Opps, it's

@echo off

and not on... my bad.


Report Offensive Follow Up For Removal







Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: VB Script needed to Copy files

Comments:

 


  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 
Data Recovery Software




Have you ever used OpenOffice?

Yes, as my main suite.
Yes, occationally.
Yes, but only once.
No, never.


View Results

Poll Finishes In 3 Days.
Discuss in The Lounge