DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
NeTraverse Merge User's Guide
Appendix C, Filename mapping

Appendix C

Filename mapping


File name issues

You can access any file or directory in the UNIX file system from a NeTraverse Merge session, whether it is created with DOS, with Windows, or with the UNIX system (provided that you have permission). In general, Windows applications support long file names, so long UNIX file names can be used as is, but older Windows and DOS applications are limited to short DOS file names. (Short DOS file names have to be at most 8 characters followed by a "." and at most 3 characters. Also known as the "8.3" form.) But even "short" UNIX filenames may not be legal DOS:

On a regular Windows system, Windows provides a mapping of long file names to short names for those older applications. (This file name mapping is also known as "file name mangling.") NeTraverse Merge provides a similar mapping for those older applications. By default the mapping done on each user's private drive C is a standard Windows ("Win9x") mapping. The mapping of filenames on other parts of the UNIX filesystem is slightly different. The style of filename mapping should not concern most people.

This appendix covers these filename mapping issues.

NeTraverse Merge has several different mapping styles that can be used. Each different drive letter that provides access to the UNIX filesystem can (and does) use different styles. This is because there is no "best" style that works for all situations. It would be best if the Windows ("Win9x") style could be used for all drives, but due to several restrictions, it can only be used on drives that only one NeTraverse Merge session uses at a time and the user must have permission to write in the directories. Thus by default only the user's personal C drive uses this mapping.

Normally the default mapping style for each drive should be used unless you have some special need to use a different mapping. Also note that chaning the mapping style of a drive could cause problems with some apps that remember mapped file and directory names. If you change the mapping, then those apps will not be able to find things!

Win 9x style mapping

There are two differences between the long file name support that Windows 95, 98 and Me provide and that which UNIX provides: For each user's personal C drive, these should be non-issues because: When NeTraverse Merge does the "Win9x" style mapping, the short names are saved differently from how native Windows does it. Native windows uses hidden FAT entries. The UNIX filesystem does not use the FAT filesystem type, so this is not possible to do in the exact same way for files on UNIX. NeTraverse Merge uses a hidden subdirectory (named ".mappedfiles") to store the mapped names. Because of this you must not delete any subdirectores with that name or change any filenames in them. But if you do, then NeTraverse Merge will recreate the mappings, but the mapping might not be the same as the original mapping.

Because hidden subdirectores are used to save "Win9x" style mapping information, the user must have permission to create subdirectories for this mapping style to work.

Note: For performance reasons, file access to the C drive is heavily buffered, which means that it is important that no other process access files in those directories while the Windows session is running.

Mapping of UNIX file names

The above section explained what the "Win9x" style mapping does. Unfortunatly this cannot be generally used for UNIX filenames. NeTraverse Merge provides two other mapping styles you can choose from:

With both of these, NeTraverse Merge creates a mapped name by appending a unique index consisting of an apostrophe or tilde followed by one or more characters. If necessary, NeTraverse Merge truncates the original name before appending the index. Characters that are not valid for DOS file names, such as the space or the plus sign, are either replaced with an underscore or removed. For example, a file called messagetoall might be mapped to the name MESS'BAQ.

The following table shows how NeTraverse Merge might map various types of Windows or UNIX names.

 ---------------------------------------------------
 UNIX name       Mapped name
 ---------------------------------------------------
 messagetoall    MESS'BAQ
 message.tobob   MESS'BBF.TOB
 +.ok            _'PP.OK
 okbase.:++      OKBAS'QW._ _ _
 a.b.c           A_B'SV.C

Standard vs. Old-Style mapping

Although you always use a file's mapped name with DOS applications, you sometimes want to know the original file or directory name. You do this using the DOS dir command in a DOS box (a.k.a "MS-DOS Prompt") started from Windows. This command shows both the mapped and actual file name.

Filename case sensitivity

Regardless of the mapping method you choose, you can enable the Case Mapping option for each UNIX drive.

On UNIX filesystems case is significant in filenames, but not for DOS and Windows filesystems:

For example, the file names my.txt, My.txt and MY.TXT are names for three completely different UNIX files. But, on DOS or Windows file systems, these names all refer to the same file. So, when NeTraverse Merge provides access to the UNIX file system for DOS or Windows, there can be some confusion about the file being referenced.

For files on your personal (C) drive, this is rarely an issue because Windows applications create and manipulate the files and no conflicting names can be created. The difficulty arises if you use Linux to create conflicting names.

When using a Windows application if you specify the filename with the case as the actual UNIX filename has, you will get the correct file. But, if you specify the name with some other case or access it from a Windows 3.1 or earlier application, and files with conflicting names exist, it is not predictable which file you will get.

The solution to this is to enable "Case Mapping". This causes NeTraverse Merge to treat UNIX file names that have uppercase characters as invalid DOS file names and map them. This allows you to access all file names unambiguously, but at the cost of causing file names to be mapped that otherwise seem to be valid DOS or Windows file names.

By default "Case Mapping" is not enabled, since it is rare to have multiple files in the same directory whose names differ only in case.

See ``File name mapping options'' in Chapter 4 for more information about how to change the file-name mapping settings in your drive configuration.


NOTE: If you enable the Case Mapping option, and you access DOS file systems or CD-ROMs that are mounted under UNIX, you should use the special mount option to cause all the filenames to be presented in lowercase and thus avoid the complexities caused by uppercase file names.