Home » Infrastructure » Unix » Script to transfer file from unix to windows or viceversa (oracle 9.2.0.8,solaris 9)
Script to transfer file from unix to windows or viceversa [message #291921] Mon, 07 January 2008 04:32 Go to next message
vishal_srivastava
Messages: 21
Registered: January 2008
Junior Member
Hi all,

i want a complete script to transfer file from unix to windows and from windows to unix.
Re: Script to transfer file from unix to windows or viceversa [message #291925 is a reply to message #291921] Mon, 07 January 2008 04:41 Go to previous messageGo to next message
Michel Cadot
Messages: 68716
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Use ftp.

Regards
Michel
Re: Script to transfer file from unix to windows or viceversa [message #291928 is a reply to message #291925] Mon, 07 January 2008 04:50 Go to previous messageGo to next message
vishal_srivastava
Messages: 21
Registered: January 2008
Junior Member
I know i can use
Ftp
ftp>cd
ftp>lcd>
bi
ha
get/put


but i want automated script which i want use in crontab.So that it runs in regular interval.
Re: Script to transfer file from unix to windows or viceversa [message #291969 is a reply to message #291928] Mon, 07 January 2008 05:51 Go to previous messageGo to next message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
What you need are two scripts: one which will invoke FTP, and another one which will be used as a "control file". This is how they might look (comments on the right side are NOT part of the script!). Also, these were written to communicate between MS Windows and OpenVMS, but - as it is about FTP - I believe it will work on UNIX as well.
time /t
c:
cd c:\temp
ftp -s:c:\temp\bftp 111.222.333.444      -- open FTP connection with this IP address and use
                                         -- credentials given in the 'bftp' file
time /t
pause
system               -- operating system username
system_pwd           -- password
cd disk5:[000000]
lcd
prompt
binary               -- don't forget to set the desired transfer mode
mget baza*.dmp
bye
Re: Script to transfer file from unix to windows or viceversa [message #291975 is a reply to message #291969] Mon, 07 January 2008 06:01 Go to previous message
Michel Cadot
Messages: 68716
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Unfortunatly there is no "-s" option in Solaris but you can use the standard "<<" to give inline commands instead.

Regards
Michel
Previous Topic: INPUT FROM SHELL SCRIPT
Next Topic: Regarding crontab schedule
Goto Forum:
  


Current Time: Sat Nov 23 20:33:15 CST 2024