[comp.sys.amiga.tech] Filename characters

sutela@polaris.utu.fi (Kari Sutela) (01/08/91)

BTW, thanks for the program. Always nice to see some example rexx-source.

jms@tardis.Tymnet.COM (Joe Smith) writes:

>The only character guaranteed not to be part of any filename is '00'x.

Is this true? For a project of mine I have recently made some tests and
I think there are other characters which aren't allowed in filenames (the
DOS manual by Bantam is a bit vague about this). My tests were quite simple;
basically I just `echo'ed some strings and tried to redirect the output to
a file.

Some tests which `failed' were:

	echo >"An*e[33mEscapeInAFilename" AString
	echo >"ANewline*nInAFilename" AString

Both gave the error "Unable to open redirection file". I use WShell, so it
might be refusing these filenames. What does the DOS say about the
characters in a filename (or is it the filesystem)?
-- 
Kari Sutela	sutela@polaris.utu.fi

rsbx@cbmvax.commodore.com (Raymond S. Brand) (01/08/91)

In article <sutela.663335373@polaris>, sutela@polaris.utu.fi (Kari Sutela) writes:
> BTW, thanks for the program. Always nice to see some example rexx-source.
> 
> jms@tardis.Tymnet.COM (Joe Smith) writes:
> 
> >The only character guaranteed not to be part of any filename is '00'x.
> 
> Is this true? For a project of mine I have recently made some tests and

[...]

> might be refusing these filenames. What does the DOS say about the
> characters in a filename (or is it the filesystem)?

The filesystem is the thing that determines what characters are legal in a
filename. Joe is correct, 0x00 is the only character garanteed not to be
part of a filename. You should also note that it is the filesystem that
determines what the path component separator is, so it might not be "/"
for some filesystems.

> Kari Sutela	sutela@polaris.utu.fi

------------------------------------------------------------------------
  Raymond S. Brand			rsbx@cbmvax.commodore.com
  Commodore-Amiga Engineering		...!uunet!cbmvax!rsbx
  1200 Wilson Drive			(215)-431-9100
  West Chester PA 19380			"Looking"
------------------------------------------------------------------------