Naming Conventions & Best Practices

Posted March 10th, 2015 at 1:02 pm.

Files named on Mac or Windows computers usually work fine on the other platform, but there are a few characters sometimes used in file names that are exceptions. The table below explains which characters might cause problems, why they do, and potential substitutes for those characters that will work on both Mac and Windows.

Filename Lengths: It is possible, with most files, to create names with multiple hundreds of characters; however, not all programs or operating systems are able to process such long filenames. Additionally, some non-English characters, when moved into different file systems, can take up the equivalent of up to 9 English characters, so limiting filenames to a manageable length can prevent these potential issues.

 

Avoid Examples Reason Recommendations
File separators :   /   \ Colons and slashes are used as directory separators

(consider your H: or S: drive), which can cause problems when they are used in contexts like file names.

Underscores or dashes

( ___   — ) can provide the same effect without these potential issues.

Symbols $      Not all operating system file systems allow these       characters, so using them in one place may not work in another. They can also cause problems with certain file types that use them frequently (like XML). Omitting or using substitutes for these characters.
Punctuation marks . , ! “ ’ ? In programming languages, many of these characters have particular functions, which can potentially cause problems when used in file names. Omitting these characters or substituting underscores or dashes ( ___   — )
Parenthesis/brackets ( ) [ ] { } As with punctuation marks, many of these characters have particular functions in certain programming         languages, which can potentially cause problems when used in file names. Omitting or using substitutes for these characters.
Operators < > * | Punctuation marks, parenthesis/brackets, and operators all fall into the same category—many of these characters have particular functions in certain programming languages, which can cause problems if used in file names. Omitting or using substitutes for these characters.
White space Most files on Windows and Mac will allow the use of white space (e.g. spaces between words) in file names, though certain applications may have trouble processing files with white space in the name. Underscores or dashes

( ___   — ) can provide the same effect without these potential issues.

Filed under: General Assistance,Learning Resources by Megan Clark

Comments are closed.