Shell script to ftp files from windows to unix


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Shell script to ftp files from windows to unix
# 1  
Old 10-08-2009
Shell script to ftp files from windows to unix

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?

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
-------------------
ftp: connect: Connection timed out
Not connected.
Not connected.
usage:lcd local-directory



Thanks
# 2  
Old 10-08-2009
Bumping up posts or double posting is not permitted in these forums.

Please read the rules, which you agreed to when you registered, if you have not already done so.

You may receive an infraction for this. If so, don't worry, just try to follow the rules more carefully. The infraction will expire in the near future

Thank You.

The UNIX and Linux Forums.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Unix shell script to delete files on windows server

Hi experts, can anyone suggest me on the below: how to write a shell script to search and delete files on windows server. -script runs on unix box -it should search for specific files on windows server and delete them periodically. (2 Replies)
Discussion started by: chpradeepch
2 Replies

2. Shell Programming and Scripting

FTP from windows to unix server using unix shell script

Hi, Is it possible to ftp a huge zip file from windows to unix server using unix shell scripting? If so what command i need to use. thanks in advance. (1 Reply)
Discussion started by: Shri123
1 Replies

3. Shell Programming and Scripting

Shell Script to transfer files from unix to windows

I have to transfer a file from unix to windows through Shell Script. I am using the below script, but it is not working. Please help. Please note --- I have to transfer the file from unix to windows. Not from windows to unix. I mean I don't have to use batch script.Only through unix shell script.... (1 Reply)
Discussion started by: vsachan
1 Replies

4. Shell Programming and Scripting

FTP from Unix Shell script to Windows Shared folder ?

Hi Before Posting my query in this forum, I have gone through various similar postings to get some idea on ftp and how to do that from unix shell script to windows server. My question is related to FTP'ing from Unix to windows shared folder My basic question is 1. Is it possible to do FTP... (4 Replies)
Discussion started by: shekharjchandra
4 Replies

5. Shell Programming and Scripting

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... (10 Replies)
Discussion started by: kavithakuttyk
10 Replies

6. Shell Programming and Scripting

FTP from unix shell script to windows

Hi, I m trying to connect/establish FTP from unix shell script to my PC.Below the script i have written #!/bin/ksh ftp -v -n ddcappip01.com << "EOF" user Amit jason bye EOF ------------------------------ERROR-------------------------- but i m getting the below error for the... (4 Replies)
Discussion started by: ali560045
4 Replies

7. Shell Programming and Scripting

FTP Unix Box to Windows Shell Script

Hello All, Could someone help me out with this? I want to incorporate this into an existing script so the output of a SAS job can be ftp'd from our UNIX box to a directory on a drive in Windows environment. Can this be done with no extra third party software? We currently use Putty for copy... (2 Replies)
Discussion started by: Jose Miguel
2 Replies

8. Shell Programming and Scripting

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... (15 Replies)
Discussion started by: knag
15 Replies

9. Shell Programming and Scripting

ftp files from Unix to Windows through shell program

Hi, I made a shell script to allow user to ftp file to windows shared drive. Here is part of my code within my shell script: /usr/bin/ftpmtc $usr $pswd $jobno Within 'ftpmtc': #ARGUMENT: USER,PASWD,JOBNO,VER,LOG_DATE,$$ $UCB/echo "user $1 $2" > $inst_file $UCB/echo "cd prod" >> $inst_file... (7 Replies)
Discussion started by: whatisthis
7 Replies

10. Shell Programming and Scripting

FTP Shell Scripts from Windows to Unix: files have exotic characters

Hey guys, I am working on my shell scripts in wordpad in windows. Then, I upload it to my unix using psftp, but when I open those files with "vi" in Unix, there are all these "^M" characters in the file. Would anyone of you have a clue as to why? Help would be appreciated. Thanks, Laud (4 Replies)
Discussion started by: Laud12345
4 Replies
Login or Register to Ask a Question