From: VAXman- on
In article <michelle-99E791.13481416012010(a)news.eternal-september.org>, Michelle Steiner <michelle(a)michelle.org> writes:
>In the Finder you try to create a name a file or folder that begins with a
>period, you get the following alert:
>
> You can't use a name that begins with a dot ��.�, because these names
> are reserved for the system. Please choose another name.
>
>That's pretty self explanatory
>
>Also in the Finder, if you try to put a colon in a file name, you get the
>following alert:
>
> The name <whatever:text.txt" can't be used. Try using a name with
> fewer characters, or with no punctuation marks.
>
>First of all, you can't get that alert by trying to create a file name
>that's too long, because as soon as you try to exceed the limit, you get a
>beep, and no more text can be entered. Secondly, is there any other
>punctuation mark, other than the colon (and leading period), that cannot be
>used in a file name?

I don't know from the Finder but if you want to use certain characters in
a filename from the command line, you must "escape" it with \. Even the
\ itself can be a part of the filename if it is escaped: back\\slash will
show as back\slash. I would think Finder would be smart enough to take a
filename and, if necessary, escape it for you if it is a legitimate char-
acter or one that requires that it be escaped to create the name.

--
VAXman- A Bored Certified VMS Kernel Mode Hacker VAXman(at)TMESIS(dot)ORG

http://www.quirkfactory.com/popart/asskey/eqn2.png

"Well my son, life is like a beanstalk, isn't it?"
From: Barry Margolin on
In article <michelle-99E791.13481416012010(a)news.eternal-september.org>,
Michelle Steiner <michelle(a)michelle.org> wrote:

> In the Finder you try to create a name a file or folder that begins with a
> period, you get the following alert:
>
> You can't use a name that begins with a dot ��.�, because these names
> are reserved for the system. Please choose another name.
>
> That's pretty self explanatory
>
> Also in the Finder, if you try to put a colon in a file name, you get the
> following alert:
>
> The name <whatever:text.txt" can't be used. Try using a name with
> fewer characters, or with no punctuation marks.
>
> First of all, you can't get that alert by trying to create a file name
> that's too long, because as soon as you try to exceed the limit, you get a
> beep, and no more text can be entered. Secondly, is there any other
> punctuation mark, other than the colon (and leading period), that cannot be
> used in a file name?

I think that's the only one. Colon is used in the traditional Mac API
as the separator between folders in a pathname, analogous to slash in
the Unix API. In fact, if you put a slash in a filename, and list it in
Terminal, it will have a colon instead.

--
Barry Margolin, barmar(a)alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***
From: Barry Margolin on
In article <00A97A51.C9D41CA4(a)SendSpamHere.ORG>,
VAXman- @SendSpamHere.ORG wrote:

> In article <michelle-99E791.13481416012010(a)news.eternal-september.org>,
> Michelle Steiner <michelle(a)michelle.org> writes:
> >In the Finder you try to create a name a file or folder that begins with a
> >period, you get the following alert:
> >
> > You can't use a name that begins with a dot ��.�, because these names
> > are reserved for the system. Please choose another name.
> >
> >That's pretty self explanatory
> >
> >Also in the Finder, if you try to put a colon in a file name, you get the
> >following alert:
> >
> > The name <whatever:text.txt" can't be used. Try using a name with
> > fewer characters, or with no punctuation marks.
> >
> >First of all, you can't get that alert by trying to create a file name
> >that's too long, because as soon as you try to exceed the limit, you get a
> >beep, and no more text can be entered. Secondly, is there any other
> >punctuation mark, other than the colon (and leading period), that cannot be
> >used in a file name?
>
> I don't know from the Finder but if you want to use certain characters in
> a filename from the command line, you must "escape" it with \. Even the
> \ itself can be a part of the filename if it is escaped: back\\slash will
> show as back\slash. I would think Finder would be smart enough to take a
> filename and, if necessary, escape it for you if it is a legitimate char-
> acter or one that requires that it be escaped to create the name.

That's because the shell treates some characters specially, and it has
nothing to do with filenames. You'd need to escape those characters to
use them in any parameter; e.g. in:

echo foo\\bar

foo\bar is just a string to be printed, it's not a filename.

--
Barry Margolin, barmar(a)alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***
From: JF Mezei on
VAXman- @SendSpamHere.ORG wrote:

> show as back\slash. I would think Finder would be smart enough to take a
> filename and, if necessary, escape it for you if it is a legitimate char-
> acter or one that requires that it be escaped to create the name.

The filename itself isn't escaped. You need the escaping machanism to
avoid the shell from interpreting the special character.

For instance, VMS can create (via NFS) a directory called
TCTPT$TFTP_ROOT without problem.

You can LS that and you will see TCPIP$TFTP_ROOT

but if you wish to use it at the command line, you need to type
TCPIP\$TFTP_ROOT otherwise the shell interpretes TFTP_ROOT as a symbol
and replaces it with its value (which would be nill since it is an
undefined symbol)


In the finder, there is no shell to process the string you enter in a
filename field so you don't need to espace special characters.
From: shine on
Michelle Steiner took to the world wide interwebs to proclaim:
> Secondly, is there any other
> punctuation mark, other than the colon (and leading period), that cannot be
> used in a file name?

Um, why would you want to use punctuation marks in a file name? Just to
be difficult?