feedburner

Subscribe

View Venkat Varkala\

Naming conventions in SharePoint vs. Windows File System

Labels:

As mentioned in my previous blog post, the naming conventions are very different

SharePoint Naming Conventions (source)

Site Names

In WSS Site Names may not contain the following characters: \ / : * ? ” < > | # { } % & ” ~ +
You cannot start a site name, subsite name, or a site group name with an underscore (_) character or with the period character
You cannot use the period character consecutively in the middle of a site name, a subsite name, or a site group name
You cannot use the period character at the end of a site name, a subsite name, or a site group name

File Names

Invalid characters: ” # % & * : < > ? \ / { | } ~ 
Cannot be longer than 128 characters
You cannot use the period character consecutively in the middle of a file name
You cannot use the period character at the end of a file name
You cannot start a file name with the period character

Folder Names

You cannot use the following characters anywhere in a folder name or a server name: ~ # % & * { } \ : < > ? / | ”
Cannot be longer than 128 characters
You cannot use the period character consecutively in the middle of a folder name
You cannot use the period character at the end of a folder name
You cannot start a folder name with the period character

Miscellaneous

The complete URL for the file or folder cannot be longer than 260 characters. Note that this includes the server, site and library name.

NTFS file system (source)

Use a period (.) to separate the base file name from the extension in a directory name or file name.
Use a backslash (\) to separate components in paths, which divides the file name from the path to it, or one directory from one another in a path. You cannot use a backslash in file or directory names. However, they can be required as part of volume names, for example, “C:\”. UNC names must have the following format:

\\<server>\<share>.

Use any character in the current code page for a name, including Unicode characters, except characters in the range of zero (0) through 31, or any character that the file system does not allow. A name can contain characters in the extended character set (128–255). However, it cannot contain the following reserved characters:
< > : ” / \ | ? *

Use a period (.) as a directory component in a path to represent the current directory.
Use two consecutive periods (..) as a directory component in a path to represent the parent of the current directory.
Do not use the following reserved device names for the name of a file: CON, PRN, AUX, NUL, COM1, COM2, COM3, COM4, COM5, COM6, COM7, COM8, COM9, LPT1, LPT2, LPT3, LPT4, LPT5, LPT6, LPT7, LPT8, and LPT9. Also avoid these names followed by an extension, for example, NUL.tx7.
Do not assume case sensitivity. Consider names such as OSCAR, Oscar, and oscar to be the same.
Do not end a file or directory name with a trailing space or a period. Although the underlying file system may support such names, the operating system does not. You can start a name with a period (.).
Maximum Path Length
In the Windows API, the maximum length for a path is MAX_PATH, which is defined as 260 characters. A path is structured in the following order: drive letter, colon, backslash, components separated by backslashes, and a null-terminating character, for example, the maximum path on the D drive is “D:\<256 chars>NUL”.

Note Functions in the Windows API convert “/” to “\” as part of converting the name to an NT style name.
The Unicode versions of several functions permit a maximum path length of approximately 32,000 characters composed of components up to 255 characters in length. To specify that kind of path, use the “\\?\” prefix.

Note The maximum path of 32,000 characters is approximate, because the “\\?\” prefix can be expanded to a longer string, and the expansion applies to the total length.

0 comments:

Post a Comment