$ perl script.pl where script.pl
- connects (via Modem, LAN, telepathy?) to the Win box;
- logs in;
- executes (that's a hint, sort of) some Win built-ins and
- concludes with a process to find and download your selected files.
Unless its going to be the same Win machine, the same commands and same files to download on each run of your script, you'll probably want to provide some way to tell the script the "which" or "where" of each of the preceeding.
Sorry, but when your write "How can I do it using perl script?," you appear to be asking us to write the script. We don't do that (in theory, anyhow); we'll be happy to help you learn, if you demonstrate some desire to do so, and provide some evidence that you've made an effort to write your own program.
Come back with an update on what you've worked out and the problem that still has you stuck: then, you'll find lots of willing help. Otherwise, hire a programmer. | [reply] [Watch: Dir/Any] [d/l] |
Thanks. I will try and get back to you.
| [reply] [Watch: Dir/Any] |
You could theoretically set up SSH/SFTP on the windows machine, log in via Net::SSH::Perl or Net::SSH from your other computer and run the commands, then log in via Net::SFTP or Net::SFTP::Foreign and copy the files as necessary. Just make sure to secure the access for a specific IP range, directory, list of commands, etc. | [reply] [Watch: Dir/Any] |
A Windows batch-job processing monitor might be more appropriate. After all, what you want to achieve is that a remote computer is sent work-to-do and the results are then sent back to you.
link-1
link-2
link-3
| [reply] [Watch: Dir/Any] |
Thanks for you reply. I will try this.
| [reply] [Watch: Dir/Any] |
In a situation like that I would use samba. I have done some elaborate samba coding in perl in the past.
You might want to check cpan for a module to simplify the transfers. Make sure to find one that handles errors as (in my experience) samba does not have very good native error handling.
| [reply] [Watch: Dir/Any] |
Sysinternals/Microsoft psExec and using a UNC path to access remote files should fill your requirements.
"XML is like violence: if it doesn't solve your problem, use more."
| [reply] [Watch: Dir/Any] |