From owner-freebsd-questions Mon Oct 12 14:38:05 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id OAA21163 for freebsd-questions-outgoing; Mon, 12 Oct 1998 14:38:05 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from dt053nb4.san.rr.com (dt053nb4.san.rr.com [204.210.34.180]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id OAA21127 for ; Mon, 12 Oct 1998 14:37:56 -0700 (PDT) (envelope-from Studded@gorean.org) Received: from gorean.org (Studded@localhost [127.0.0.1]) by dt053nb4.san.rr.com (8.8.8/8.8.8) with ESMTP id OAA07973; Mon, 12 Oct 1998 14:37:11 -0700 (PDT) (envelope-from Studded@gorean.org) Message-ID: <36227686.42C5934D@gorean.org> Date: Mon, 12 Oct 1998 14:37:10 -0700 From: Studded Organization: Triborough Bridge & Tunnel Authority X-Mailer: Mozilla 4.5b2 [en] (X11; I; FreeBSD 2.2.7-STABLE-1009 i386) X-Accept-Language: en MIME-Version: 1.0 To: Sue Blake CC: Norman C Rice , freebsd-questions@FreeBSD.ORG Subject: Re: ftp get filenames with spaces and junk text References: <19981012175615.48311@welearn.com.au> <19981012105901.A26212@emu.sourcee.com> <19981013053326.50449@welearn.com.au> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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