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

Hi Monks
Happy New Year
I want to copy files from windows2000 to a free BSD os using perl script. Script is running on the free BSD OS.
hope that somebody can help me on this thanking you
with regards
Krishnan

Replies are listed 'Best First'.
Re: want to copy files from windows
by strat (Canon) on Jan 08, 2005 at 10:59 UTC

    well, it depends on how you want to control the script (via web? via console or GUI?) and how you can access the win2000 machine (via samba/network neighborhood, ftp, http,...)

    Best regards,
    perl -e "s>>*F>e=>y)\*martinF)stronat)=>print,print v8.8.8.32.11.32"

      these two systems are in a LAN . i want to know hw i can get files from a dirctory of windows to a freeBSD system. The script will run in a regular intervals. say once in every 10 min. and also after getting the file i want to delete the files from the windows system. these systems have a trusted connection.
Re: want to copy files from windows
by zagzag (Novice) on Jan 09, 2005 at 02:38 UTC
    I'm use Filesys::SmbClient for copy files without mounting...
    Also possible use IP as machine name...
    use Filesys::SmbClient; use POSIX; my $smb = new Filesys::SmbClient(username => "alian", password => "speed", workgroup => "alian", debug => 10); # Read a file my $fd = smb->open("smb://jupiter/doc/general.css", '0666'); while (defined(my $l= $smb->read($fd,50))) {print $l; } $smb->close(fd); # ...

    Zahatskii Alexandr
Re: want to copy files from windows
by BUU (Prior) on Jan 08, 2005 at 07:46 UTC
    Hi krishnan
    Happy New Year
    I have some help for you. Write some perl code to copy files.
    Hope that this is helping you
    with regards
    buu