Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Oct 1998 14:37:10 -0700
From:      Studded <Studded@gorean.org>
To:        Sue Blake <sue@welearn.com.au>
Cc:        Norman C Rice <nrice@emu.sourcee.com>, freebsd-questions@FreeBSD.ORG
Subject:   Re: ftp get filenames with spaces and junk text
Message-ID:  <36227686.42C5934D@gorean.org>
References:  <19981012175615.48311@welearn.com.au> <19981012105901.A26212@emu.sourcee.com> <19981013053326.50449@welearn.com.au>

next in thread | previous in thread | raw e-mail | index | archive | help
Sue Blake wrote:

[lots of snipping]
> But that's not my problem. Getting the file off the macintosh is OK.
> The only way is 'get "silly name of file"', no matter what client I use.

> For lots of files, I could learn how to run a script on my machine to
> rename them afterwards. But after reading the ftp man page, I see there
> is a better method and I want to use it.
> 
> The standard ftp client has a feature which can be activated to rename
> all files automatically as it writes them to the local disk. I want to
> learn how to use this feature of ftp. It is simple, and documened, but
> I don't understand the syntax.

  get remote-file [local-file]
                 Retrieve the remote-file and store it on the local
machine.
                 If the local file name is not specified, it is given
the same
                 name it has on the remote machine. . . 

Perhaps it is just too simple. It is a well established documentation
convention that anything in [square brackets] is an optional parameter
to a command. That is what the documentation refers to when it says that
if the local name is not specified, it gets the same name as the remote
file on your local machine. So, if you want to download "silly file with
spaces" and store it as "not_so_silly" on your machine, you'd do:

ftp> get silly file with spaces not_so_silly

	I *imagine* but wouldn't swear to ftp being smart enough to recognize
the first bit as the file name and not try to get a file called "silly
file with spaces not_so_silly" however I haven't tested it. It might be
necessary to put the filename on the remote machine in quotes. If it
doesn't work at all even with the quotes, it's a bug and you should send
a PR on it. 

Doug
-- 
***           Chief Operations Officer, DALnet IRC network          ***

    Go PADRES!

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?36227686.42C5934D>