File name restrictions with Windows NT

I’m having a hard time following you… I cannot use “nul” or “con” ANYWHERE in a filename - even as part of a filename.

Is this correct?

I appreciate all the thought and effort you’re putting in here, but the design staff over here is point, click and drag. The process you are recommending is SO not an option. Not even remotely.

Under the pre-X MacOS, you were wise not to begin filenames with periods. That’s not because such files were “hidden” files, as they are under Unix, but because MacOS signified some device drivers that way — like the “.Sony” driver for the internal 3.5-inch disk drives. So although the HFS filesystem would permit a file beginning with a period, a standard “open” call on that file would likely fail with a “device not found” error, because the OS was trapping the name and trying to locate a driver for that name.

And heaven help you if you actually named a file “.Sony”. What are you, a comedian?

No. He means that a file named solely NUL (ie 3 letters, no more, no less) would not be legal. a file named NULLify would be fine, as wopuld a file named annulment. Ditto for CON, COM1, COM2, COM3, LPT1, LPT2 or LPT.

Traditional DOS convention is that these names are written in all uppercase, but you would have a problem if you named a file CON or Con or cON. Modern Windows stored the filename however you capitalized it, but considers any variation in capitalization to be the same file. ie save a file named ABcd then try to retrieve a file named acCD and you’ll get the first file back. You can’t have two files whose names differ only by capitalization in the same folder.

As to Nanoda’s assertion that “If the files are on an NT box, then DOS will figure in to things. (It’s there under all the nifty looking stuff in most Microsoft OSs)”, that’s not quite true.

What’s under there is “DOS compatibility”, not DOS. They built Windows with an awwareness that they needed to carry some of the rules of DOS forward into the Windows world during the transition. And since that rule was in effect in Win 3.1 it had to be carried forward when we went to the 9x series, and since it was in effect int eh 9x series it had to be carreis forward into NT & NTFS and …

Those restrictions will be with us until / unless they build a completely new, completely legacy-free (ie incompatible with everything prior) OS and file system.

The 31-character limit is probably a consequence of using Windows NT’s built-in AppleTalk stack. In other words, the Mac users aren’t mounting it as a CIFS/SAMBA resource but as an AppleTalk resource. (Windows NT Server’s “Services for Macintosh” makes this possible. Back in the MacOS 9/8/7/etc days there was no native Mac support for Windows-style networking).

NT’s AppleTalk stack uses the old Mac file naming limitations whether the Macs themselves do or don’t.

Regarding the “names you should never name a file”, the older MacOS had one of those also. Under the Classic MacOS (9/8/7/etc), don’t ever name a file “.Sony” and in particular don’t save a file by that name to the root of your startup volume. The OS expects its invisible floppy disk driver to have that name, and the results can be unfortunate.

The only normal, printable char that’s limited on the Mac is “:” - you’re not allowed to have it in a filename, and if you try to create one manually the Finder silently changes it to a dash. There are a few others that are bad ideas under either the old Mac OS or OS X: files containing “*” or starting with a period can give you hassles in certain directories or when looking at them as Unix files. The slashes are similar, but I live with them: one of my biggest pet peeves about Windows is not being able to have filenames with slash-delimited dates in them: “Diary 10/25/05” for example.

In Windows, files can’t start or end with spaces, but on the Mac they can; this gives certain file transfer software problems as well.

Ahem

I think there’s an echo in here. :slight_smile:

Sorry 'bout that, Bytegeist! I think I opened the thread and then got distracted for a long time before getting around to reading it, and thereby missed reading your post yesterday.

Don’t forget .Sony