|
|
|
|
google site
|
|||||||
| Forums | Register | Blog | Man Pages | Forum Rules | Links | Albums | FAQ | Users | Calendar | 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 and shell scripting languages here. |
![]() |
|
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|||
|
shell script to ftp the files from windows to unix server
Hi,
I need to ftp some input files from windows to unix server.All the files will be saved in the C drive in my machine. Currently all these files are transferring manually to the unix server.I need to write a shell script which ftp the files from windows to unix box.When I searched in the forum i got the below mentioned script to ftp the files.It works fine when i ftp the files from one unix server to another unix server.But it is not working when i tried from Windows to unix .I am getting the below mentioned error message.can anybody help me on this? Code:
HOST=111.212.242.233
PASSWORD=xxxx
USER=kk1234
FILE_NAME=test1.dat
ftp -v -n ${HOST} << cmd
user ${USER} ${PASSWORD}
cd /home/kkk/test/
lcd C:\Documents and Settings\Folder1get ssh_install
ls ${FILE_NAME}
get ${FILE_NAME}
quit
cmd
ERROR MESSAGE ------------------- Code:
ftp: connect: Connection timed out Not connected. Not connected. usage:lcd local-directory Last edited by Franklin52; 10-08-2009 at 04:50 AM.. Reason: Please use code tags! |
| Sponsored Links |
|
|
|
|||
|
The usage error is because of the space in the directory name.
But ... "cd" refers to the remote (Windows) server and "lcd" refers to the local (unix) server. Quote:
Code:
cd "C:\Documents and Settings\Folder1get ssh_install" lcd /home/kkk/test/ |
|
|||
|
Thanks Methyl the error with lcd has gone now.
Zaxxon, Thanks for your suggestion The ip address which I have given is my machine ip and it is up.I can connect from my WINDOWS dos prompt to the unix server and do the ftp process sucessfully.This error i recieve only when itry to connect to the machine ip from the unix server by using the command ftp -v -n 111.212.242.233 Regards |
|
|||
|
Sounds like you have not started the FTP listener service on the Windows server ... or the Windows firewall is running with FTP blocked.
On the Windows server, can you ftp to yourself? If you can't do that there is no chance from the outside. Code:
ftp localhost ftp 111.212.242.233 |
|
|||
|
I tried this in the command prompt but i could not able to login with my password.How can I prevent the windows firewall blocking the FTP server?. Currently WinScp client has installed in my machine.Do i need to install some software like File Zilla server to try this ?Kindly Please guide me on this.
|
|
|||
|
What exact version of Windows are you running?
|
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| FTPing files from unix server to windows server | venkatesht | Shell Programming and Scripting | 1 | 04-28-2009 10:54 AM |
| Script runs fine on UNIX Server...Not through MSK Tool kit on Windows Server | madhunk | UNIX for Dummies Questions & Answers | 5 | 01-31-2008 01:30 PM |
| Shell Script to ftp from windows server | shilpa.rajput | Shell Programming and Scripting | 8 | 11-07-2007 12:52 AM |
| shell script to transfer files from Unix to Windows | knag | Shell Programming and Scripting | 15 | 12-05-2006 05:46 PM |
| Unix Sco Open Server, Windows Computers Problem Access Unix Shared Files Help!!!!! | haggo | Filesystems, Disks and Memory | 2 | 08-23-2006 12:39 PM |