Operating System - HP-UX
1834945 Members
2145 Online
110071 Solutions
New Discussion

Re: Unix script to ftp files to a Windows system from a Unix Box

 
Venkat Naidu
New Member

Unix script to ftp files to a Windows system from a Unix Box

Hi,

I am in need of a unix script which reads a flat file which has the filename in column1 and the target location in column2.
The script should copy the files from the unix box by reading column1 and place them in the target location mentioned in the respective column2. The target location is always a fodler in the Windows system. But it varies based on the filename.

Tha script should handle all everything like connecting to the server,while taking care of access permissions, etc.

Please help me in this.

Thanks,
Venky
1 REPLY 1
Steven E. Protter
Exalted Contributor

Re: Unix script to ftp files to a Windows system from a Unix Box

Shalom,

I will have to assume that the windows server is running windows ftp server or this will never work.

Standard ftp commands will work, nothing else. Default permissions are set at the server.

ftp -n << ENDFTP
user
prompt
ascii
lcd
cd
mget *
ENDFTP

This thread contains better ideas:

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1046219

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