perlmonk1984 has asked for the wisdom of the Perl Monks concerning the following question:

To copy files from server,
1) we need to logon to server
2) select files or folders to copy
3) paste it to any drive on local system.......
I need all this to do at one shot,so i want to generate perl script for it.
Can anybody help me out in how to start with please......
  • Comment on To generate perl script for copying folders and files that are on server to my local system.

Replies are listed 'Best First'.
Re: To generate perl script for copying folders and files that are on server to my local system.
by zentara (Cardinal) on Feb 27, 2006 at 13:11 UTC
    I think your requirement (2) "select files or folders" , after logging on, will present the greatest obstacle. If you know which files/folders beforehand, it would be alot simpler. See Copying files to an authenticated Win32 share

    But if you want to navigate the remote filesystem, select items, then download them, it will require that you "maintain state" during the connection. That pretty much means you will need to setup a socket connection on your own, possibly with a gui, which will let you select from a directory tree, then download them. Maybe you could use ftp?

    I don't think you will find a "quick-1-shot-script" to do this, at least not for free here.


    I'm not really a human, but I play one on earth. flash japh
Re: To generate perl script for copying folders and files that are on server to my local system.
by marto (Cardinal) on Feb 27, 2006 at 11:37 UTC
    Hi perlmonk1984,

    I notice that this is your first post, welcome to the Monastery.
    Please read the PerlMonks FAQ and How do I post a question effectively? if you have not done so already. You need to provide more information as to which operating system this script is to run on and connect to, which services are available for logging in and retrieving files (perhaps ftp/scp for a unix/linux type environment ?) before we can offer advice to match your requirements and available resources.

    Hope this helps.

    Martin
      Thanks a lot Martin for Replying me...... Server machine is windows 2000 and we have domain authentication for it so we login to the server through IP Address. And my Local system is Windows Xp. To run script i installed Activeperl on my machine. Regards, Bobby