Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Authenticated Copy from one Windows m/c to another windows m/c

by karthikasasanka (Acolyte)
on Jan 18, 2011 at 06:54 UTC ( #882817=perlquestion: print w/replies, xml ) Need Help??
karthikasasanka has asked for the wisdom of the Perl Monks concerning the following question:

Hi, I am currently working on some automation task, where I need to copy a file from a windows server(eg.. \\server123\loc) to local machine. The server m/c requires authentication. Can anyone please suggest me if any perl modules are there or any way I can do the copy?
  • Comment on Authenticated Copy from one Windows m/c to another windows m/c

Replies are listed 'Best First'.
Re: Authenticated Copy from one Windows m/c to another windows m/c
by nikosv (Chaplain) on Jan 18, 2011 at 09:59 UTC

      If you are running it from a linux local machine,

      use expect;

      and crontab to schedule it.

Re: Authenticated Copy from one Windows m/c to another windows m/c
by youlose (Scribe) on Jan 18, 2011 at 10:45 UTC
    Start this task with credentials of user who has access to this computer via task scheduler.
Re: Authenticated Copy from one Windows m/c to another windows m/c
by youlose (Scribe) on Jan 18, 2011 at 10:50 UTC
    use Win32::NetResource
Re: Authenticated Copy from one Windows m/c to another windows m/c
by tokpela (Chaplain) on Jan 18, 2011 at 16:49 UTC

    You are looking for the Connect routine in the Win32::FileOp module.

    This will allow you to authenticate to Windows shares. You might also be interested in Map which would allow you to create a mapped drive to copy to.

      Thanks for the solution.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://882817]
Approved by ELISHEVA
help
Chatterbox?
[Corion]: :-D
[stevieb]: I suppose I'll have to delete the 2.36 ver, then re-upload 2.36.1 and 2.36.2, and re-version 2.36 as 2.36.0
[Corion]: stevieb: Naah, I wouldn't delete versions from CPAN. Just up the version to 2.37 resp. 2.37.0 / 2.37.1 etc

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (12)
As of 2017-01-19 14:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you watch meteor showers?




    Results (170 votes). Check out past polls.