Skip to content

Instantly share code, notes, and snippets.

@ZyqGitHub1
Forked from doctaphred/ntfs-filenames.txt
Created March 24, 2020 04:51
Show Gist options
  • Save ZyqGitHub1/db8db02f6814838a1813f05b90f59701 to your computer and use it in GitHub Desktop.
Save ZyqGitHub1/db8db02f6814838a1813f05b90f59701 to your computer and use it in GitHub Desktop.

Revisions

  1. @doctaphred doctaphred revised this gist Sep 4, 2019. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion ntfs-filenames.txt
    Original file line number Diff line number Diff line change
    @@ -43,4 +43,5 @@ Handy list to copy/paste:

    ---

    Note: Other OSs and file systems may vary; but in general, the only forbidden characters in filenames on Unix-like systems appear to be the forward slash (/) and the null byte.
    Note: Other OSs and file systems may vary; but in general, the only forbidden characters
    in filenames on Unix-like systems appear to be the forward slash (/) and the null byte.
  2. @doctaphred doctaphred revised this gist Sep 4, 2019. 1 changed file with 9 additions and 1 deletion.
    10 changes: 9 additions & 1 deletion ntfs-filenames.txt
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx
    Information from https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx :

    Use any character in the current code page for a name, including Unicode
    characters and characters in the extended character set (128–255), except
    @@ -35,4 +35,12 @@ https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx
    user interface does not. However, it is acceptable to specify a period
    as the first character of a name. For example, ".temp".

    ---

    Handy list to copy/paste:

    <>:"/\|?*

    ---

    Note: Other OSs and file systems may vary; but in general, the only forbidden characters in filenames on Unix-like systems appear to be the forward slash (/) and the null byte.
  3. @doctaphred doctaphred revised this gist Aug 4, 2017. 1 changed file with 13 additions and 0 deletions.
    13 changes: 13 additions & 0 deletions ntfs-filenames.txt
    Original file line number Diff line number Diff line change
    @@ -21,5 +21,18 @@ https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx
    31, except for alternate data streams where these characters are
    allowed. For more information about file streams, see File Streams.
    - Any other character that the target file system does not allow.

    - Do not use the following reserved 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 immediately by an extension; for
    example, NUL.txt is not recommended.

    - Do not end a file or directory name with a space or a period. Although
    the underlying file system may support such names, the Windows shell and
    user interface does not. However, it is acceptable to specify a period
    as the first character of a name. For example, ".temp".

    <>:"/\|?*
  4. @doctaphred doctaphred created this gist Aug 4, 2017.
    25 changes: 25 additions & 0 deletions ntfs-filenames.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,25 @@
    https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx

    Use any character in the current code page for a name, including Unicode
    characters and characters in the extended character set (128–255), except
    for the following:

    - The following reserved characters:

    < (less than)
    > (greater than)
    : (colon)
    " (double quote)
    / (forward slash)
    \ (backslash)
    | (vertical bar or pipe)
    ? (question mark)
    * (asterisk)

    - Integer value zero, sometimes referred to as the ASCII NUL character.
    - Characters whose integer representations are in the range from 1 through
    31, except for alternate data streams where these characters are
    allowed. For more information about file streams, see File Streams.
    - Any other character that the target file system does not allow.

    <>:"/\|?*