Operating System - HP-UX
1760212 Members
3414 Online
108893 Solutions
New Discussion юеВ

Re: file from windows folder to unix box other that FTP?

 
$aravana
New Member

file from windows folder to unix box other that FTP?

Hi,
I am trying to transfer a file from windows floder(say "D:\test\file1.txt") to UNIX box (Say IP:"xxx"& path "$Home\test").

So i need a perl script to move the file from the window to unix.

Thanks in advance!!!
7 REPLIES 7
Steven E. Protter
Exalted Contributor

Re: file from windows folder to unix box other that FTP?

Shalom,

All recent versions of windows have Samba/CIFS built in.

Set up a windows share with the windows GUI first.

Install CIFS/9000 Client from http://software.hp.com on the HP-UX box.

This will require a reboot to install kernel modules.

At this point you will be able to use cifs tools to connect to the windows share enabling file transfer by perl script, shell script or many other means.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Robert-Jan Goossens
Honored Contributor

Re: file from windows folder to unix box other that FTP?

James R. Ferguson
Acclaimed Contributor

Re: file from windows folder to unix box other that FTP?

Hi:

> file from windows folder to unix box other that FTP?

I'd use SFTP (which is far superior in many respects.

> So i need a perl script to move the file from the window to unix.

Using perl, you could cobble a script which uses the 'Net::SFTP::Foreign' perl module.

Of course, you could do even less work by installing something like 'winscp' on your Windows box:

http://winscp.net/eng/index.php

Regards!

...JRF...
Steven Schweda
Honored Contributor

Re: file from windows folder to unix box other that FTP?

> [...] other that FTP?

Why "other tha[n?] FTP"?

> So i need a perl script to move the file
> from the window to unix.

Why perl, specifically?

On which system were you planning to run this
perl script?
Suraj K Sankari
Honored Contributor

Re: file from windows folder to unix box other that FTP?

Hi,
Other then FTP you can download 3rd party utility like SFTP, WFTP.
install into your desktop and transfer file to your Unix box.

Suraj
nightwich
Valued Contributor

Re: file from windows folder to unix box other that FTP?

Hi


You have several options here:


- winscp
- ftp
- cifs/mount


The easiest is the winscp just install on your windows machine and then connect to the unix box by ftp sftp or scp.

If you need any more information reply.

Please assign some points.
Abdul Hakkim
New Member

Re: file from windows folder to unix box other that FTP?

Hi Below script help u transfer file from windows specified path file to unix specified path using perl ftp script.


use Net::FTP;

my $host = "UNIX Server Name";
my $user = "username";
my $credential = "pwed";

my $f = Net::FTP->new($host) or die "Can't open $host\n";

$f->login($user, $credential) or die "Can't log $user in\n";

$f->ascii(); #$f->binary();

$f->cwd("/usr/myFolder")or die "Cannot change working directory ", $f->message;

$f->put("C:\\myFolder\\mySample.txt");

print "File has been transfered successfullly...\n";

$f->quit();