Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > macOS > Help with FTP get command

Help with FTP get command
Thread Tools
Tom C
Junior Member
Join Date: May 2001
Status: Offline
Reply With Quote
Sep 30, 2005, 02:48 PM
 
I've always used RBrowser for FTP, but I need to write a script, so I've been trying to learn how to use the command line ftp utility.

After connecting to a server, if I type...

get pathname1/pathname2/filename

...then I'm told that the file or directory does not exist. However, if I type...

cd pathname1/pathname2/
get filename

...everything works fine. Can you not use pathnames with the get command, i.e., get works only in the current directory?
     
bradoesch
Professional Poster
Join Date: Jun 2000
Status: Offline
Reply With Quote
Sep 30, 2005, 08:31 PM
 
I just tried it out and it worked for me. Read the man page for ftp and you'll see some advice for using ftp with scripts.
     
[APi]TheMan
Mac Elite
Join Date: Sep 2001
Location: Chico, CA and Carlsbad, CA.
Status: Offline
Reply With Quote
Oct 1, 2005, 01:29 PM
 
Originally Posted by Tom C
After connecting to a server, if I type...

get pathname1/pathname2/filename

...then I'm told that the file or directory does not exist. However, if I type...
Did the filename in question have a space in it?
"In Nomine Patris, Et Fili, Et Spiritus Sancti"

     
Tom C  (op)
Junior Member
Join Date: May 2001
Status: Offline
Reply With Quote
Oct 3, 2005, 09:31 PM
 
I figured out what the problem was. If you type...

get /path1/path2/filename

...with only one filename, it assumes that you're talking about the destination, not the source. The following works fine:

get sourcepath1/sourcepath2/sourcefile targetpath1/targetpath2/targetfile

Thanks for the help.
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 01:49 PM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,