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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

COPY A FILE FROM LOCAL TO NETWORK SHARE

Status
Not open for further replies.
Oct 8, 2002
62
US
I WANT TO KNOW IF ANY ONE CAN SHOW ME HOW TO WRITE A SCRIPT SOMETHING LIKE A BACKUP. I WANT TO COPY THREE FILES FROM THERE LOCATION TO A FOLDER ON A NETWORK SHARE. EACH FILE WILL GO TO A DIFFERENT FOLDER WITHIN ONE FOLDER DIR.

IF ANYONE CAN HELP PLEASE TELL ME.
 
I'm not sure if this is exactly what your looking for but here is a very simple copy script you can use.


Dim oFso
Set oFso = CreateObject("Scripting.FileSystemObject")

Source_Dir="c:\Some_Directory\Some_File.txt"
Destination_Dir="\\Some_Server\Some_Share\Some_Folder\"

oFso.CopyFile Source_Dir, Destination_Dir, True
Set oFso = Nothing


Danzig
 
Have you the correct rights to write to the destination folder ?
Does it work in command line ?


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top