Copy/Check Files?

_DjAlex_
09-02-2003, 02:09 AM
Is there Any way to Copy (in a local network) and after, check
if the file has been copied with success? if not it will send a
proper mesage all over the network with the "NET.EXE msg".

I'd like to copy from "F:\Backup\CGI-BIN\myscript.dll"
to "\\192.168.0.1\C$\Inetpub\CGI-BIN\myscript.dll"

There is a kind of problem, the computer that has the "F:\" has to access
"\\192.168.0.1\C$\Inetpub\CGI-BIN\" and i have to login with account: "Administrator"
and password: "AdminPasswd"

!!Note that this program is to run from Taskmanager!!

This is suposed to not have user interview.

Any help would be very apreciated

Grimfort
09-02-2003, 03:10 AM
One way is to use the FileSystemObject (also know as Microsoft Scripting Runtime).

This has been covered many times already, so do a search if you get stuck (and before you post). But heres the basics:

Dim thing As New FileSystemObject

thing.CopyFile "here", "to here"

Garmour
09-02-2003, 03:39 AM
The questions you are asking would imply at least a basic knowledge of computing/programming, so I'm surprised you haven't just looked in the VB help files for this info.
There are many ways to copy files in VB. There's the FSO method mentioned by Grimfort, there's the filecopy command and there are a couple of ways using the API.

Each method will produce some kind of error in the event of a problem (ie, source file doesn't exist or is open, or the destination is unavailable).

_DjAlex_
09-02-2003, 10:10 AM
i tried to use FileSystemObject but when i compile the project
i get an error.

00100b
09-02-2003, 11:08 AM
What is the error that you are getting and where in your code is it occurring?

_DjAlex_
09-03-2003, 09:50 AM
sorry...my fault!

its working fine now.
but...i can't copy the file because of the Login and passwd.
i need to save the login and password first.
any idea?

00100b
09-03-2003, 12:42 PM
Maybe this thread (http://www.visualbasicforum.com/t104252.html) will provide you with a possibility.

_DjAlex_
09-05-2003, 09:31 AM
Thanks thanks thanks thanks thanks!!!!!!! :cool:

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum