transfer text file from Unix to Windows shared drive

Hi
Can any one help me in writing script to transfer textfile from unix box to windows shared drive?

I don't have Samba, Only method I can you is ftp or Perl Script.
Can you help me in writing Perl script or ftp scritp.
Windows servername =USA1234DR
Unix Servername = UXDVE12

My file is in
$home/usr> ls
test.txt

I want to copy to my windows shared drive \\USA1234DR\workingdir

Thanks
Raj
rajsan1Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

lk-dataCommented:
Can you use SSH ?

The use this software here: http://winscp.net

Normaly you can use SSH on unix.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Adam314Commented:

use Net::FTP;
 
$ftp = Net::FTP->new("USA1234DR.your.company", Debug => 0)
  or die "Cannot connect: $@";
 
$ftp->login("username",'password')
  or die "Cannot login ", $ftp->message;
 
$ftp->cwd("/workingdir")
  or die "Cannot change working directory ", $ftp->message;
 
$ftp->put("your.file")
  or die "get failed ", $ftp->message;
 
$ftp->quit;

Open in new window

rajsan1Author Commented:
I am getting error when I compile this code
Can't locate Net/FTP.pm in @INC (@INC contains: /opt/per15/lib/5.00502/PA-RISC1.1
Can you help me..

OR Is it possible in ftp script
Learn SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

Adam314Commented:
From a prompt as root:
    cpan Net::FTP
OR
    perl -MCPAN -e 'install Net::FTP'
gheistCommented:
You need SAMBA installed on UNIX client machine. Then you can use smbclient to transfer file to windows share.
Alternatives are NFS server included with MS-SFU, or using least common denominator - FTP

http://hpux.connect.org.uk/hppd/hpux/Networking/Misc/samba-3.0.10/
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
System Programming

From novice to tech pro — start learning today.