Hi RKNYC,
This is a subtle issue. The path separator is the character that delimits directory names in the path. As Camelot said, the path separator is never a valid filename character. The complexity comes in the fact that OS X has two ways of specifying a path, each with a different path separator. The classic OS use a colon as a path separator but UNIX components use a forward slash as a path separator.
Instead of eliminating both characters as valid filename characters, Apple made an interesting choice that really is the only way to eliminate just one character. If you put a forward slash in a filename in a carbon app, it will be allowed because carbon apps use classic paths internally so only a colon is disallowed. However, if you list the same file with a UNIX tool, you couldn't see a forward slash because that would be illegal. Instead, you see a colon in the place of the slash. There's an illegal character and the other one and if you put the other in a filename, it will change depending on context.
What happened to you is almost certainly the opposite of my example above. AppleScript can handle both contexts but the syntax for UNIX paths is tricky. What you probably did was use a UNIX path in a classic context. AppleScript took you to mean that you wanted a file at the top level of the drive that has a very long filename with lots of slashes in it. That is, your slashes were taken as filename characters: the other character. Then when you listed it in a UNIX context, those slashes turned to colons.
In order to get AppleScript to understand UNIX paths — to treat a forward slash as a delimiter — you have to specify the path as a POSIX path, like so:
Posix file "/var" as alias
That acts as a handle to a file, which you can create if it doesn't already exist. An alias doesn't have to exist while a file does.
There's one thing I don't understand: why the files would be invisible. I hate that AppleShowAllFiles option. I've got a lot of UNIX apps that store their preference files as hidden files (filenames beginning with a period) at the top level of my home directory. I couldn't find a thing if I had to sift through all of that. However, your filenames don't begin with a period and I just checked; on my machine, filenames beginning with a colon are shown in the Finder — they just begin with a slash. (the Finder is a Carbon app)
--
Gary
~~~~
An effective way to deal with predators is to taste terrible.