You can so this from a batch file just as easily as from perl.
If you are copying files from a share and all the machines are on the same domain, you 
don't need to log it. If the machine's name is frank and the share is bob, they the 
syntax is:

xcopy *.* \\frank\bob.

If the machines are not on the domain, you will have to log in first. Let us assume 
there is no shares but you need access to files in various directories. You need to 
tell the machine who you are first by doing this:
net use \\frank\c$ /User:frank\Administrator

It will then ask you for the password of the local administrator on frank. NOTE: I 
don't know how to respond to passwords in a Win32 batch file but with perl it should 
be quite easy. After you have authenticated as the local Administrator you may do 
whatever you want including formatting \\frank\c$. If you want to log in as someone 
else you'll have to check their rights on whichever directories you want to copy from 
since \\frank\c$ is a default Administrator's share only. See the help files in Win2k, 
command line commands summary.

>From perl this stuff would be strait forward.

Cheers,
John


> -----Original Message-----
> From: Valerie Kramer [mailto:[EMAIL PROTECTED]]
> Sent: Friday, January 24, 2003 4:27 AM
> To: Perl Win32 Admin Messages
> Subject: Login to peer-to-peer network computer
> 
> 
> I have a LAN consisting of all Windows 2000 computers connected in a
> peer-to-peer network.  There is no domain controller etc.
> 
> I am trying to write a program to access some files on 
> another computer but
> I need to log in to that computer first.  I can connect manually using
> Windows Explorer but I want it all automated in the program. 
> Can anyone show
> me how to do this in Perl or at least point me to the right module(s)?
> 
> Thank you.
> 
> Valerie
> 
> _______________________________________________
> Perl-Win32-Admin mailing list
> [EMAIL PROTECTED]
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
> 
_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to