Changes

Jump to: navigation, search

Portable Filenames

1,449 bytes added, 16:21, 16 October 2008
m
Recommendations: added a few clarifications
To find a set of characters which can meet all these criteria this article is originally based on content from Wikipedia Online Encyclopedia, especially the articles [http://en.wikipedia.org/wiki/Filename Filenames], [http://en.wikipedia.org/wiki/Comparison_of_file_systems Comparison of file systems] and [http://en.wikipedia.org/wiki/Ascii ASCII character encoding] and [http://msdn.microsoft.com/en-us/library/aa365247.aspx Naming a File] from MSDN. Please add other references to improve this article.
= Recommendations Introduction =If you follow the rules below want to make sure your directories files can be safely moved between different types of computers you need to consider what your files can and can't be called and how they can and files can't be organised. For example, a file called ''uk_census_of_15.5.1851.txt'' will not be handled without issues understood by a Windows computer. And even though your computer might let you make a file called ''birth_certificate_of_André_Mollier.jpg'' it won't open on all computers because of the following: servers, USB drives, CDthat accented 's, DVD's, Blue Ray discs, HD DVDé's, hard drives formatted with FAT32, NTFS, EXT2/3, Windows from '95 onwards, POSIX compliant systems (Linux, Unix, OSX) and much more...
Not supported are If you follow the rules below then your directories and files will be handled without issues on all of the following:* servers* USB drives* CD's , DVD's, Blue Ray discs and HD DVD's using the file format ISO 9660 level 1. This is * hard drives formatted with FAT32, NTFS, EXT2/3* Computers running Windows ''very'' unlikely to be an issue for you unless your operating system is from before 1995 95 and later* Any POSIX compliant systems ([http://enLinux, Unix, OSX) and much more.wikipedia.org/wiki/Joliet_(file_system) Joliet extensions to ISO 9660]).
Not supported by the rules on this page are CD's and DVD's using the original file format from 1988 known as ISO 9660:1988 level 1. This is ''very'' unlikely to be an issue for you unless your operating system is from before 1995, which is when the [http://en.wikipedia.org/wiki/Joliet_(file_system) Joliet extensions] to the original CD format (ISO 9660 level 1) were added. == Safe characters File and directory names ==To make a list of ''unsafe'' characters would take up far too much space, so here is the list of what is safe. Notice that a space is not a safe character.* a-z Lowercase alphabetical characters without any accents (see below)* A-Z Uppercase alphabetical characters without any accents (see below)
* 0-9 Numerals
* - Hyphens/ dashes (see belowexcept at the start)
* _ Underscores
* . Period/ full stop (see below)
== Safe character use ==The characters from the list of safe characters must be used with a little some care.:* a-z,A-Z Capital and small letters. Always use mixed case. ''MYFILE.txt'' can become ''myfile.txt'' without warning. ''MyFile.txt'' will not be changed by [http://en.wikipedia.org/wiki/Comparison_of_file_systems#Features most file systems] without warning. (Windows [http://msdn.microsoft.com/en-us/library/aa365247.aspx ignores capitalisation])so two otherwise identical names in the same directory with only capitalisation being different, ie: ''uk_census_1851.txt'' and ''UK_Census_1851.txt'', is not possible on many systems* - Hyphens must should not start a file name.{{fact}}Many types of scripts use a hyphen to indicate that what follows is an option for the script. If the file itself starts with a hyphen the script will try to interpret it as an option and almost certainly fail* . Period/ full stop, if used while allowed it must '''can only''' be one, two '''or''' three characters from used to indicate the end start of the a file extension. It may not be used to start a directory name.(Limitation of [http://www.controlledvocabulary.com/imagedatabases/filename_limits.html ISO 9660 level 1 ]) === Illegal file names ===* CON, PRN, AUX, CLOCK$, NUL, COM0, COM1, COM2, COM3, COM4, COM5, COM6, COM7, COM8, COM9, LPT0, LPT1, LPT2, LPT3, LPT4, LPT5, LPT6, LPT7, LPT8, and WindowsLPT9 ([http://msdn.microsoft.com/en-us/library/aa365247.aspx reference])also ., and .. ([http://en.wikipedia.org/wiki/Filename#Reserved_characters_and_words reference])
== Limits ==
There are limits imposed by operating systems and file formats. The lowest of each of these limits (for systems after 1994) is listed below.
* The number of nested directories in any path on a CD must not be more than eight . Ie: ''(root plus seventhe CD itself) /2/3/4/5/6/7/file.txt'' (the limit of [http://en.wikipedia.org/wiki/ISO_9660 ISO 9660]). Is this valid after 1995? --[[User:Duncan|DuncanNZ]] 12:21, 16 October 2008 (EDT)* The number of directories on a CD is limited to 65,535 (the limit of [http://en.wikipedia.org/wiki/ISO_9660 ISO 9660]) on Windows)* The length of a file 's path , ie: ''/genealogy/sources/uk_census_1851.txt'', is limited to 256 characters (the limit of [http://msdn.microsoft.com/en-us/library/aa365247.aspx Windows Path Size])* The length of a file 's name , ie: ''uk_census_1851.txt'', is limited to 31 characters including the period and extension (Limit the limit of the Macintosh [http://en.wikipedia.org/wiki/Hierarchical_File_System HFS] file system)* The size of files a file is limited to 2 GiB gigabytes (the limit of [http://en.wikipedia.org/wiki/ISO_9660 limit of ISO 9660] and the Macintosh [http://en.wikipedia.org/wiki/Hierarchical_File_System HFS] file system) == Illegal file names ==* CON, PRN, AUX, CLOCK$, NUL, COM0, COM1, COM2, COM3, COM4, COM5, COM6, COM7, COM8, COM9, LPT0, LPT1, LPT2, LPT3, LPT4, LPT5, LPT6, LPT7, LPT8, and LPT9 ([http://msdn.microsoft.com/en-us/library/aa365247.aspx ref]) also ., and .. ([http://en.wikipedia.org/wiki/Filename#Reserved_characters_and_words ref])
= Needing clarification =
239
edits

Navigation menu