Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Xcopy to pasword protected network folder

3,854 views
Skip to first unread message

te...@testnospam.nl

unread,
Sep 15, 2009, 1:43:51 PM9/15/09
to
Is it possible to use xcopy for a network folder that has a username
and password in a batch?

Let's say I want to copy files to a shared folder
\\Network drive\openshare\receive\

Username: Jos
Password: open

How can I make this work in a batch?

Thanks!!!!!

Pegasus

unread,
Sep 15, 2009, 1:58:56 PM9/15/09
to

<te...@testnospam.nl> wrote in message
news:3bkva5thh2ncmcfef...@4ax.com...

By embedding the password in your batch file (which creates a big security
hole!)

@echo off
net use \\server\share\folder /user:Jos open
xcopy \\server\share\folder\file.ext d:\


te...@testnospam.nl

unread,
Sep 15, 2009, 4:09:19 PM9/15/09
to
>> Let's say I want to copy files to a shared folder
>> \\Network drive\openshare\receive\
>>
>> Username: Jos
>> Password: open
>>
>> How can I make this work in a batch?
>>
>> Thanks!!!!!
>
>By embedding the password in your batch file (which creates a big security
>hole!)
>
>@echo off
>net use \\server\share\folder /user:Jos open
>xcopy \\server\share\folder\file.ext d:\
>

Thanks for the solution and the warning about the security hole!
I will use it wisely!

Thanks!

te...@testnospam.nl

unread,
Sep 15, 2009, 4:44:16 PM9/15/09
to
>By embedding the password in your batch file (which creates a big security
>hole!)
>
>@echo off
>net use \\server\share\folder /user:Jos open
>xcopy \\server\share\folder\file.ext d:\
>

I was wondering if this could be done at startup of the computer?
If I make a batchfile in the startup folder that connects to this
drive it will work.
But is there in XP a more secure way to connect to this drive @
startup?
A way where the password is not visible?

Pegasus

unread,
Sep 15, 2009, 5:28:56 PM9/15/09
to

<te...@testnospam.nl> wrote in message
news:ptuva5dggeobfh3vk...@4ax.com...

Yes - create an account on the machine that hosts the share. The account
name & password must match your own account name & password. In this case
you will no longer need to supply a password for the copy process. Note also
that this is really a Windows XP question, not a batch question.


0 new messages