![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Transfer files from Unix server to Windows using FTP | gjsaravanan | UNIX for Dummies Questions & Answers | 1 | 08-22-2005 04:55 PM |
| ftp files from Unix to Windows through shell program | whatisthis | Shell Programming and Scripting | 7 | 05-04-2005 06:28 AM |
| FTP Shell Scripts from Windows to Unix: files have exotic characters | Laud12345 | Shell Programming and Scripting | 4 | 02-17-2005 02:57 PM |
| transfer of files via ftp from windows to unix | chambala5 | Shell Programming and Scripting | 1 | 11-09-2004 07:33 AM |
| Trying to transfer b/w Unix and Windows | dirtysparks | UNIX for Dummies Questions & Answers | 6 | 09-23-2003 10:59 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
shell script to transfer files from Unix to Windows
I need to write a shell script to transfer files from Unix server to windows machine. This script will be scheduled on scheduler to run at specified intervals
#!/bin/ksh ftp -n alaska <<End-Of-Session user sss01 sample cd /home/sss01 lcd D:/sample mget *.txt bye when I executed the above shell script. It throws error saying file location D:/sample not found. Can somebody please help me in writing the script? |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
Quote:
Code:
#!/bin/ksh ftp -n alaska <<End-Of-Session user sss01 sample cd /home/sss01 lcd D:/sample mget *.txt bye End-Of-Session |
|
#3
|
|||
|
|||
|
Hi Vino,
Thanks for you reply! I added the EOF statement at the end. Now the session the coming out of ftp. but the error 'D:/Nagaraj: No such file or directory' still exists can you please help.. |
|
#4
|
||||
|
||||
|
Quote:
|
|
#5
|
||||
|
||||
|
It's complaining about the "lcd" command, telling the local system (that's running the FTP script) to change directory (as opposed to changing the directory on the FTP server.)
That looks like a Windows path to me (D:\sample). But your script is calling /bin/ksh. Are you on a Windows box, a Unix box, or a Windows box with SFU or Cygwin installed? |
|
#6
|
|||
|
|||
|
I created also script to transfer file from UNIX to WIn.but I had to set up ftp directory in windows(IIS) so I can just put my files in that directory..
I would also love to see is it possible to use lcd command so I could change windows directory in my unix script??? It that possible?? |
|
#7
|
|||
|
|||
|
How do i issue an command via FTP to an AS400 from an unix platform
Help
How do i issue an command via FTP to an AS400 from an unix platform? |
|||
| Google The UNIX and Linux Forums |