Microsoft Windows Character Limits for Naming Folders and Files
Business Technology (BTech)
BTech Alerts & Notifications - Check this page for the latest information on emergencies and system outages. All times are Pacific.
Overview
A guide for naming Folders and Files in the Microsoft Windows Environment.
Managing the length of the Folder Names and File Names will reduce the risk of losing information.
Microsoft Windows imposes a maximum path length of 260 characters (including both the file name and the path to it).
Naming files in Microsoft Windows is crucial for efficient organization and easy retrieval. If the file path exceeds this limit, you may encounter issues accessing the file.
Long filenames are a well-known issue at jobsites but doesn’t get attention until there is an issue with opening files.
Section A: Creating meaningful and well-structured file paths and filenames in Microsoft Windows
Descriptive and Clear:
Use descriptive names that convey the content or purpose of the file.
Avoid generic or cryptic names like “document.pdf”, “misc.docx”, “miscellaneous.pdf”, or “file.txt.”
Alphanumeric Characters Only:
Stick to alphanumeric characters (letters and numbers).
Avoid special characters or symbols that may cause compatibility issues.
Use Underscores Instead of Spaces:
Separate words in file names using underscores (_) rather than spaces.
Underscores serve as a convenient way to separate words within a filename.
Unlike spaces, which can cause issues, underscores are a safe choice.
For example: project_report.docx instead of Project Report.docx.
Include Dates (if relevant):
Add dates to file names for time-sensitive documents.
For instance: budget_2024.xlsx.
Be Concise:
Keep file names short but meaningful.
Long names can be unwieldy and may get truncated in certain contexts.
Avoid Reserved Words:
Do not use reserved words like “CON,” “PRN,” “AUX,” or “NUL.”
These are reserved by the Windows operating system.
Version Control:
If you have multiple versions of a file, use version numbers (e.g., v1, v2) in the file name.
Maintain consistency in versioning.
Case Insensitivity:
Remember that Windows file names are case-insensitive.
However, it’s good practice to use title casing (capitalizing the first letter of each word).
Avoid Excessive Length:
Windows supports longer file names.
Avoid exceeding 260 characters (including the path).
Be mindful of folder structures and nesting.
Section B: File and Folder Names Character Length Limits
Maximum Length: The total length of a file or folder name (including the full path) should, generally, be 260 characters or less.
Individual Limit: No individual file or folder name can exceed 255 characters. This includes spaces and backslashes used as separators.
Section C: Characters
Stick to alphanumeric characters (letters and numbers).
Windows file names are case-insensitive.
Avoid characters or symbols that may cause compatibility issues or confusion.
Parentheses “()”, dash “-“, hyphen “–“
Use an underscore “_” to replace the space character.
A space will translate to “%20” and take up 3 characters.
Reserved Characters:
Be cautious with reserved URL characters.
Do not used reserved characters:
Reserved Characters
ob1_Estimate.pdf
· File path is 91 characters total (leaving 169 characters remaining).
References
Microsoft Learn: Naming Files, Paths, and Namespaces - Win32 apps https://learn.microsoft.com/en-us/windows/win32/fileio/naming-a-file