Familypedia
m (moved Genealogy:PortableDigitalRecords to Genealogy:Portable Digital Records: More search engine friendly)
 
(8 intermediate revisions by the same user not shown)
Line 7: Line 7:
   
 
If you follow the rules below then your directories and files will be handled without issues on all of the following:
 
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. Hard drives formatted with FAT32, NTFS, EXT. Computers running Windows '95 and later. Any POSIX compliant systems (Linux, Unix, OSX) and much more...
* servers
 
* USB drives
 
* CD's, DVD's, Blue Ray discs and HD DVD's
 
* hard drives formatted with FAT32, NTFS, EXT2/3
 
* Computers running Windows '95 and later
 
* Any POSIX compliant systems (Linux, Unix, OSX)
 
and much more...
 
   
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.
+
If your operating system is from before 1995 you should be aware that the rules described on this page are not supported by ISO 9660:1988 level 1. After that the [http://en.wikipedia.org/wiki/Joliet_(file_system) Joliet extensions] fixed several issues.
   
 
== File and directory names ==
 
== File and directory names ==
Line 22: Line 16:
 
* A-Z Uppercase alphabetical characters without any accents (see below)
 
* A-Z Uppercase alphabetical characters without any accents (see below)
 
* 0-9 Numerals
 
* 0-9 Numerals
* - Hyphens/ dashes (except at the start)
+
* - Hyphens/ dashes (except at the start of a file name)
 
* _ Underscores
 
* _ Underscores
   
 
The characters from the list of safe characters must be used with some care:
 
The characters from the list of safe characters must be used with 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]. 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
+
Always use mixed case because ''MYFILE.txt'' can become ''myfile.txt'' without warning. In contrast ''MyFile.txt'' will not be changed by most file systems<ref>[http://en.wikipedia.org/wiki/Comparison_of_file_systems#Features 'Comparison of file systems'] article at [http://en.wikipedia.org Wikipedia]</ref>. Windows ignores capitalisation<ref>[http://msdn.microsoft.com/en-us/library/aa365247.aspx 'Naming Files, Paths, and Namespaces'] at [http://msdn.microsoft.com MSDN]</ref>.
* - Hyphens should not start a file name. 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, while allowed it can only be used to indicate the start of 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])
 
  +
Hyphens should not start a file name because a hyphen indicates that what follows is an option for a script.
  +
 
The period/ full stop, while allowed, can only be used to indicate the start of a file extension. It may not be used to start a directory name. (Limitation of ISO 9660<ref>[http://www.controlledvocabulary.com/imagedatabases/filename_limits.html ' Recommendations for Limitations on Image Filenaming']at the [http://www.controlledvocabulary.com Controlled Vocabulary Website]</ref>)
   
 
=== Illegal file names ===
 
=== 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 reference]) also ., and .. ([http://en.wikipedia.org/wiki/Filename#Reserved_characters_and_words reference])
+
* 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 <ref>[http://msdn.microsoft.com/en-us/library/aa365247.aspx 'Naming Files, Paths, and Namespaces'] at [http://msdn.microsoft.com MSDN]</ref> also . (a single period) and .. (two consecutive periods) <ref>[http://en.wikipedia.org/wiki/Filename#Reserved_characters_and_words 'Naming Files, Paths, and Namespaces'] at [http://msdn.microsoft.com MSDN]</ref>
   
 
== Limits ==
 
== Limits ==
Line 41: Line 38:
 
* The size of a file is limited to 2 gigabytes (the limit of [http://en.wikipedia.org/wiki/ISO_9660 ISO 9660] and the Macintosh [http://en.wikipedia.org/wiki/Hierarchical_File_System HFS] file system)
 
* The size of a file is limited to 2 gigabytes (the limit of [http://en.wikipedia.org/wiki/ISO_9660 ISO 9660] and the Macintosh [http://en.wikipedia.org/wiki/Hierarchical_File_System HFS] file system)
   
  +
= References =
= Needing clarification =
 
  +
{{Reflist}}
The following are not recommended but I can't find any reference to why they could be a problem. They are all ASCII characters.
 
 
{| border="1"
 
|-
 
| #
 
| number sign
 
| {{yes}}
 
| Not reserved[http://en.wikipedia.org/wiki/Filename ref]
 
|-
 
| &
 
| Ampersand
 
| {{yes}}
 
| Not reserved([http://en.wikipedia.org/wiki/Filename ref])
 
|-
 
| '
 
| Apostrophe
 
| {{yes}}
 
| Not reserved([http://en.wikipedia.org/wiki/Filename ref]). Some websites have trouble handling file names containing apostrophes ([http://bugs.php.net/bug.php?id=33918 PHP Bug #33198])
 
|-
 
| ( and )
 
| Parentheses
 
| {{maybe}}
 
| Unclear. [http://en.wikipedia.org/wiki/(#Computing Reference].
 
|-
 
| +
 
| Plus
 
| {{yes}}
 
| Not reserved([http://en.wikipedia.org/wiki/Filename ref])
 
|-
 
| ,
 
| Comma
 
| {{yes}}
 
| Not reserved([http://en.wikipedia.org/wiki/Filename ref])
 
|-
 
| ;
 
| Semi colon
 
| {{yes}}
 
| Not reserved([http://en.wikipedia.org/wiki/Filename ref])
 
|-
 
| =
 
| Equals sign
 
| {{yes}}
 
| Not reserved. [http://en.wikipedia.org/wiki/Filename#Reserved_characters_and_words reference].
 
|-
 
| @
 
| At sign
 
| {{yes}}
 
| Not reserved. [http://en.wikipedia.org/wiki/Filename#Reserved_characters_and_words Reference].
 
|-
 
| [ and ]
 
| square brackets or box brackets
 
| {{yes}}
 
| Not reserved. [http://en.wikipedia.org/wiki/Filename#Reserved_characters_and_words Reference].
 
|-
 
| ^
 
| Caret
 
| {{yes}}
 
| Not reserved. [http://en.wikipedia.org/wiki/Filename#Reserved_characters_and_words Reference].
 
|-
 
| _
 
| Underscore
 
| {{yes}}
 
| Not reserved. [http://en.wikipedia.org/wiki/Filename#Reserved_characters_and_words Reference].
 
|-
 
| { and }
 
| Curly brackets
 
| {{yes}}
 
| Not reserved. [http://en.wikipedia.org/wiki/Filename#Reserved_characters_and_words Reference].
 
|-
 
| ~
 
| Tilde
 
| {{yes}}
 
| Not reserved. [http://en.wikipedia.org/wiki/Filename#Reserved_characters_and_words Reference].
 
|-
 
|}
 
   
 
= External links =
 
= External links =

Latest revision as of 18:12, 12 December 2009

In order to be able to move our media files from one computer to another it is critical that the names of our files can be understood by the different file systems and encodings they meet.

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 Filenames, Comparison of file systems and ASCII character encoding and Naming a File from MSDN. Please add other references to improve this article.

Introduction[]

If you want to make sure your 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 can't be organised. For example, a file called uk_census_of_15.5.1851.txt will not be 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 that accented é.

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. Hard drives formatted with FAT32, NTFS, EXT. Computers running Windows '95 and later. Any POSIX compliant systems (Linux, Unix, OSX) and much more...

If your operating system is from before 1995 you should be aware that the rules described on this page are not supported by ISO 9660:1988 level 1. After that the Joliet extensions fixed several issues.

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 (except at the start of a file name)
  • _ Underscores

The characters from the list of safe characters must be used with some care:

Always use mixed case because MYFILE.txt can become myfile.txt without warning. In contrast MyFile.txt will not be changed by most file systems[1]. Windows ignores capitalisation[2].

Hyphens should not start a file name because a hyphen indicates that what follows is an option for a script.

The period/ full stop, while allowed, can only be used to indicate the start of a file extension. It may not be used to start a directory name. (Limitation of ISO 9660[3])

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 [4] also . (a single period) and .. (two consecutive periods) [5]

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 directories in any path on a CD must not be more than eight. Ie: (the CD itself)/2/3/4/5/6/7/file.txt (the limit of ISO 9660). Is this valid after 1995? --DuncanNZ 12:21, 16 October 2008 (EDT)
  • The number of directories on a CD is limited to 65,535 (the limit of 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 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 (the limit of the Macintosh HFS file system)
  • The size of a file is limited to 2 gigabytes (the limit of ISO 9660 and the Macintosh HFS file system)

References[]

External links[]