It is currently Thu, 30 Oct 2014 05:38:52 GMT



 
Author Message
 "lcd" Within an FTP Script
I'm having a problem changing my local directory
within my Korn shell FTP script.  The FTP script
worked well until I tried adding an "lcd"
command.  My current script looks like this...

HOST=<ip address>
DESTDIR='e:\\ftp\\ftpdest'
SRCDIR=<source directory>

ftp -n -v -i $HOST <<!
user <userid> <userpass>
lcd $DESTDIR
cd $SRCDIR
bin
hash
prompt
mget *
close
quit
!

I get an error message saying that the directory
can't be found.  The directory exists and can be
accessed via a normal FTP session.  Any help with
this problem would be greatly appreciated.

...Colin

Sent via Deja.com http://www.**-**.com/
Before you buy.



 Mon, 24 Jun 2002 03:00:00 GMT   
 "lcd" Within an FTP Script

I think you have the two directories backwards.  lcd is for changing
directory on the local, Unix machine, while cd is for changing directory on
the FTP server.  e:\\ftp\\ftpdest doesn't look like a Unix pathname, so I
assume it must be the directory on the FTP server running Windows.

--
Barry Margolin, bar...@bbnplanet.com
GTE Internetworking, Powered by BBN, Burlington, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.



 Mon, 24 Jun 2002 03:00:00 GMT   
 "lcd" Within an FTP Script

Since you're posting to comp.unix.shell, I presume that you are
running this bash script on a unix system of some sort?  If so,
are you sure that the directory with the funny name is a
subdirectory of the directory that you're in when you start up
this script?  Put another way, does:
   ls -1 | grep e:
show the named $DESTDIR directory?

                --Ken Pizzini



 Tue, 25 Jun 2002 03:00:00 GMT   
 "lcd" Within an FTP Script
In article <Nm9d4.24$hP4.1403@burlma1-snr2>,
  Barry Margolin <bar...@bbnplanet.com> wrote:

Thanks Barry... You solved my problem.  As stupid as it sounded, I just
continually overlooked it until I got frustrated and wasn't even seeing
the problem anymore.  I appreciate your help.

...Colin Terry

Sent via Deja.com http://www.deja.com/
Before you buy.



 Tue, 25 Jun 2002 03:00:00 GMT   
 "lcd" Within an FTP Script
I don't understand the question.

In our last episode, the evil Dr. Lacto had captured our hero,
  colin_te...@my-deja.com, who said:

Are you running on a Unix machine?

or a Windows machine?

..hymie!         http://www.smart.net/~hymowitz         hy...@lactose.smart.net
===============================================================================
I am the village idiot.  I don't have anything to do with this pathetic
little opera.  I just felt like passing through!                --P. D. Q. Bach
===============================================================================



 Tue, 25 Jun 2002 03:00:00 GMT   
 "lcd" Within an FTP Script
On 2000-01-06 colin_te...@my-deja.com said:
   >I'm having a problem changing my local directory
   >within my Korn shell FTP script.  The FTP script
   >worked well until I tried adding an "lcd"
   >command.  My current script looks like this...
   >HOST=<ip address>
   >DESTDIR='e:\\ftp\\ftpdest'
   >SRCDIR=<source directory>
   >ftp -n -v -i $HOST <<!
   >user <userid> <userpass>
   >lcd $DESTDIR
   >cd $SRCDIR
   >bin
   >hash
   >prompt
   >mget *
   >close
   >quit
   >!
   >I get an error message saying that the directory
   >can't be found.  The directory exists and can be
   >accessed via a normal FTP session.  Any help with
   >this problem would be greatly appreciated.
Are you sure you need to double the backslashes inside single quotes?  Or,
assuming that you are using a Unix shell over some version of DOS or Windows,
you might be able to use forward slashes instead of back slashes for the
local directory.

Net-Tamer V 1.08X - Test Drive



 Wed, 26 Jun 2002 03:00:00 GMT   
 
   [ 6 post ] 

Similar Threads

1. ftp script "disappears"

2. GETSERVBYNAME()????????????????????"""""""""""""

3. lcd display "ghosting"

4. NVIDIA + LCD = X display "rolls" continually

5. "NO RESPONSE WITHIN TIMEOUT PERIOD" problem

6. "Bootinfo" fails within rc.boot

7. "Source Route Failed", "LOGIN FAIL..", "Malformed response", and "Lame server" messages in /var/log

8. "WaveRunner"/"Linux"/"OS/2 Warp"/"ISDN "


 
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software