Using a Batch file to copy files through network

B

baldyws

I need to backup few files from several 2k pro onto 2k
server. I wrote a batch file to do the job, but im having
trouble with the net use connection. I get system Error
67. Please help! Is there a better way of accomplishing
this task? Tnx

------
@echo off
REM files are stored in \\w2k-srvr\Backup_drive

net use Z: "\\w2k-srvr\Backup_drive\" /user:backup\bcd20

xcopy "C:\Documents and Settings\mach100\Documents" "Z:\"

net use Z: /delete
-----
 
P

Pegasus \(MVP\)

baldyws said:
I need to backup few files from several 2k pro onto 2k
server. I wrote a batch file to do the job, but im having
trouble with the net use connection. I get system Error
67. Please help! Is there a better way of accomplishing
this task? Tnx

------
@echo off
REM files are stored in \\w2k-srvr\Backup_drive

net use Z: "\\w2k-srvr\Backup_drive\" /user:backup\bcd20

xcopy "C:\Documents and Settings\mach100\Documents" "Z:\"

net use Z: /delete
-----

I note that you're coding an account override - /user:backup\bcd20.
This raises some questions:
- Is there a server or domain called "backup"?
- Is there a user account called "bcd20" on "backup"?
- Is "w2k-srv" a member of the backup domain, or does it
know about the "bcd20" account?

In most cases you do not need that whole /user stuff, unless
you are forced to impersonate another user. Why do you put it in?
 
B

B. Goodman

I get the same results without quotes. System error 67.
Is there any other way?
Under what account is the batch being run? If it is aleady the user
"backukp\bcd20", you should not need to specify the user information in
your batch file. If it is NOT bcd20, you would need to provide a
password for bcd20 as part of your "net use" command, right?

Also, error 67 IIRC is "network name cannot be found". Are you SURE you
have such a share? Is the machine correctly resolving the name "w2k-
srvr"? Can you open a CMD prompt and issue the "net use" manually and
get it to work?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top