problem while using FTP in shell script


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting problem while using FTP in shell script
# 1  
Old 01-18-2010
problem while using FTP in shell script

Hi all,
I am having problem while using FTP in shell script.I am downloading a file from other machine.Part of file name is known to me(in red)

20100114123814.portin.virginsubs.extract

What i am doing is trying to get the file using get command with wild card "*" (see below) but it fails but if i use ls with wild card it works.Any ideas?

Code:
 
 ftp> get 20100114*.portin.virginsubs.extract
Error opening local file 20100114*.portin.virginsubs.extract.
> 20100114*.portin.virginsubs.extract:Invalid argument
ftp> ls 20100114*.portin.virginsubs.extract
200 PORT command successful. Consider using PASV.
150 Here comes the directory listing.
20100114123814.portin.virginsubs.extract
226 Directory send OK.
ftp: 42 bytes received in 0.00Seconds 42000.00Kbytes/sec.

# 2  
Old 01-18-2010
Try using mget instead of get.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Need a Shell Script for FTP

Hello Brothers, I am new in shell script.I need a shell script that will run in Linux Server. Script will connect to windows FTP server before connection script will check the connection from linux server to windows server, if connection is ok then show a message and get specific file and... (34 Replies)
Discussion started by: maruf
34 Replies

2. Shell Programming and Scripting

problem in exit status of the command in a shell script-FTP

Hi All, I have developed below script for FTP a file from unix machine to another machine. ftpToABC () { USER='xyz' PASSWD='abc' echo "open xx.yy.zbx.aaa user $USER $PASSWD binary echo "put $1 abc.txt" >> /home/tmp/ftp.$$ echo "quit" >> /home/tmp/ftp.$$ ftp -ivn <... (3 Replies)
Discussion started by: RSC1985
3 Replies

3. Solaris

FTP Script Problem

Hi Everybody, I am working on FTP Script (i,e Parser.sh,Upload.sh) and the contents of the same are mentioned below .., #!/bin/bash if ; then echo "Usage ./Parser.sh IP USERNAME PASSWORD SOURCE FILENAME DESTINATION where IP ------------- IP address of remote... (0 Replies)
Discussion started by: prasanth_babu
0 Replies

4. Shell Programming and Scripting

Problem with here doc operator in FTP script

Hello folks, I am facing a problem with the following korn shell script snippet: ftp -n -i -v <<EOF print -p open $CURR_HOST print -p user $USER $PASSWD print -p binary print -p cd /mydir/subdir/datadir print -p get $FILENAME print -p bye EOF exit It gives me the following... (3 Replies)
Discussion started by: Rajat
3 Replies

5. Shell Programming and Scripting

Having a problem with a FTP Script using perl

Hello All, I have a problem that has me stumped. I am using perl to do some ftp'ing of files. I have the script in place on another environment that is functioning flawlessly. But after tweaking it to the new environment I can't get it to function. I have a search string that searches for... (6 Replies)
Discussion started by: scottzx7rr
6 Replies

6. Shell Programming and Scripting

FTP script and problem

We have a script where we're trying to ftp to an outside ftp server, but it keeps failing with the error: 421 Service not available, remote server has closed connection if we ftp <server> and manually enter the username and password from the Unix box it's just fine. But when we try to... (1 Reply)
Discussion started by: lawadm1
1 Replies

7. Shell Programming and Scripting

FTP on Reliant UNIX - script problem

Hello... I have script that works perfect on solaris but on Reliant UNIX sometimes it does not work ...I send files to my Xp(from Reliant UNIX) but if I try to send it to my solaris machine file can not be send... script is: #!/bin/ksh localFile=$1 remoteFile=$2 ... (0 Replies)
Discussion started by: amon
0 Replies

8. Shell Programming and Scripting

FTP Script Problem

Hi, Firstly, I would like to admit that I am a scripting newb. :) Now, to my question: I am writing a script that FTPs a bunch of logs from one server to another, it will be scheduled in Cron to run every 20 minutes. Currently, the file transfer part of the script is fine. However,... (2 Replies)
Discussion started by: reebz
2 Replies

9. Shell Programming and Scripting

ftp in shell script

Hi, I have to ftp to a remote machine. i have got the Ip, username and password and the file path.. I need to get the file name with out user intervention in my script.. is there any way to do this.. please help esham (2 Replies)
Discussion started by: esham
2 Replies

10. UNIX for Advanced & Expert Users

problem with ftp script...please help

Hi, I'm writing an ftp script that is trying to connect to a remote NT box. Here is my script: ftp -i ipaddress user username password ascii cd db_Backup lcd /home/dB_backups put *.sql bye When I run this script I get the following error: 500 'AUTH GSSAPI': command not... (2 Replies)
Discussion started by: vancouver_joe
2 Replies
Login or Register to Ask a Question