Controlled Vocabulary

Recommendations for Limitations on Image Filenaming

To reinterate from the filenaming page, the most important thing that a filename can do for your image collection is to provide a form of unique identification ( or [UID] ) for each digital "asset." However if you wish to be able to exchange your image files with clients or colleagues (often using different computer operating systems), then you need to observe some standards for cross-platform compatibility to ensure maximum portability. Here are some recommendations to avoid potential problems.

File and Directory (i.e. "Folders") Naming Recommendations

1. When creating file and folder (directory) names limit your filenames to the characters A-Z, a-z, 0-9, underscore ( _ ), period ( . ), and hyphen ( - ).

Why? Using only these characters will provide for maximum "portability" and fewer problems with exchanging files between various operating and storage systems. Other forms of punctuation such as / \ : ! @ # $ % ^ < > , [ ] { } & * ( ) + = may have specific uses with various operating systems and create confusion or errors. For example the \ (back slash) often indicates the various directory or folder levels in a path on the Windows operating system, and the : (colon) serves the same purpose on the Mac operating system. Blank spaces can also create a problem if placing image files on the web. For example posting a file such as "my portrait.jpg" will cause many systems to automatically insert something like "%20" to fill in the blank space changing the filename to "my%20portrait.jpg" which can be quite confusing in determining what is the "real" filename.

2. Do not use a period ( . ) or hyphen ( - ) as the first character of a name (for example "-ar1825r.tif". Do not use a period as the last character of a name (for example, "ar1825r.tif.").

Why? Some operating systems, such as UNIX or POSIX, have special rules for what is allowed as the first character of a filename. The Windows operating system does not allow the use of a period as the last character in a filename, as the operating system will "ignore" the second period creating confusion as to what the actual three letter file extension may be for that file..

3. Do include a single period as a separator along with the standard three letter extension ( .tif [tagged image file format] , .psd [photoshop], .jpg [joint photographic experts group], etc).

Why? A number of operating systems partially or completely rely on this extension in order to determine which application is used to open the file in question.

4. Do not use more than one period in a file name, and limit the portion after the period to three characters (often referred to as the file "extension.").

Why? Because doing so will ensure full backwards compatibility for ISO-9660 level 1, as well as other legacy systems like OpenVMS, Windows 95-98, etc. Also some mail filtering programs will consider a file with two periods to be a "virus" or "worm" that the sender is trying to disguise and will generally result in your attachment not making it to your recipient. Be careful when you use the built in "archive" function of Mac OS X to save a file, as it routinely leaves the existing three letter extension and adds the .zip to the name. Thus archiving "an10256r.tif" creates a file called "an10256r.tif.zip" which may not be welcomed by automated mail filtering/scanning applications.

5. Do not use periods in directory (folder) names (for example, "animals.wildlife").

Why? A period in the directory name is prohibited in ISO-9660 without Joliet extensions, OpenVMS native filesystem, and other legacy systems.

6. Do not assume names are case sensitive. For example, do not expect a directory to be able to hold separate elements named "Lifestyle" and "lifestyle".

Why? A number of operating systems are case insensitive. For example, Windows NTFS preserves letter case when it stores names, but is case insensitive when searching for names.

7. Do not assume names are case insensitive. For example, do not expect a file created with the name of "AN18256R.JPG" to be opened or found successfully using "an18256r.jpg". On some systems this will work, on others it may not.

Why? Some filesystems are case sensitive. For example, the UNIX/Linux operating systems are, as well as files when viewed on most websites. Some systems might understand that these are the same, but there are no guarantees.

8. Don't use hyphens in names.

Why? Yes, this does contradict the first recommendation, but if you want full compatibility with legacy systems such as ISO-9660 level 1, then this is required as they do not permit hyphens.


Limits to File Length, Total Path Length and Total Directory levels

There are also limits for the total path length, and/or number of directory levels. These paths are stored within applications such as image databases, and are used internally when, for example, you "drag-and-drop" files from one location to another. As this happens behind the scenes you may not have ever noticed it, but it can create problems or errors when you least expect it.

So, while limiting the length of file names can reduce their expressiveness, using long file name lengths inhibits portability. For example, using the The best filenaming system for your needs needs to be balanced with those of others with whom you will interact. You might like to use filenames that are 56 characters in length, but don't plan on sharing them with anyone on an older Mac or Windows system, or writing them to a CD-R.

The specific limit for filename depends on the operating system, network, and or file systems for which you wish to exchange files.

*Many computer or network operating systems can not deal with total path lengths that exceed 256 characters in length. The Windows 2000 operating system limits paths to a maximum of 260 characters total. When writing CD-R's, note that ISO 9660 has an explicit directory tree depth limit of 8, although this depth limit is removed when using the Joliet extensions. See the Wikipedia entry for ISO 9660 for additional details.

For another take on this subject, see The Mac & Windows OS File/Folder naming rules on Mark Anderson's PortfolioFAQ site, or the Filename page on Wikipedia.

 

examples  |  books  |  products  |  image databases  |  links  |  what's new
imagedatabases  |  programs  |  IPTC standard  |  downsampling  | filenaming 
metalogging  |  captioning  |  keywording  |  guidelines  | metalog resources
home  |  contact  | sitemap