Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan Now×
Skip to content
Redmond desk3 min

Windows File Names: Rules, Limits, and What Counts as a Name

A Windows file name is one component of a path. Learn the ordinary Win32 rules for reserved characters, device names, whitespace, case, and length.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A Windows file name is the name of one file or folder within a path. Backslashes separate the path into components, so C:UsersSamreport.txt contains the file name report.txt and the folders Users and Sam. The familiar Windows rules are common Win32 naming conventions, not guarantees that every filesystem, app, or programming interface handles names identically.

What makes up a Windows file name?

A file name identifies one file-system entry; a directory name identifies a folder entry. In an ordinary path, the backslash () divides those names into components. The component is distinct from the full path: a short file name can sit inside a long sequence of folders.

As an Amazon Associate I earn from qualifying purchases.

Windows naming behavior is best understood as the interaction of common Win32 conventions, the filesystem, the path namespace, and the application or API. Microsoft’s naming guidance notes that rules for forming names can depend on the filesystem.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Which characters should you avoid?

For ordinary Win32 file and directory names, avoid these reserved characters:

  • Less than and greater than signs: < and >
  • Colon: :
  • Double quotation mark: "
  • Forward slash and backslash: / and
  • Vertical bar: |
  • Question mark and asterisk: ? and *

For example, report:final.txt contains a reserved colon; use a name such as report-final.txt instead. NUL and control characters numbered 1 through 31 are also disallowed by the general guidance, with an exception noted for alternate data streams. A destination filesystem may impose additional limits.

Why are names such as CON and NUL reserved?

Windows reserves certain names for device use. The reserved set includes CON, PRN, AUX, NUL, COM1 through COM9, and LPT1 through LPT9. It also includes COM and LPT variants that use the superscript digits ¹, ², and ³.

Rank #2
Dell Latitude 5420 14" FHD Business Laptop Computer, Intel Quad-Core i5-1145G7, 16GB DDR4 RAM, 256GB SSD, Camera, HDMI, Windows 11 Pro (Renewed)
  • 256 GB SSD of storage.
  • Multitasking is easy with 16GB of RAM
  • Equipped with a blazing fast Core i5 2.00 GHz processor.

Adding an extension does not make a reserved device name ordinary: NUL.txt and NUL.tar.gz are still treated as reserved. Avoid these names when creating files through ordinary Windows interfaces.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Can a Windows file name start or end with a space or period?

A leading period is allowed. However, Microsoft advises against ending an ordinary file or directory name with an ASCII space or period: those characters may be stripped when the name is created, so the stored name may differ from what was entered. Microsoft’s support guidance on names ending in a period or space explains this behavior.

Rank #3

Other whitespace is a less predictable edge case. Win32 can enumerate files regardless of whitespace placement, but WinRT enumeration has limitations for trailing non-ASCII whitespace on local or remote filesystems. For names that must work reliably across ordinary Windows applications, avoid leading or trailing whitespace rather than relying on how a particular interface handles it. See Microsoft’s naming guidance and support article.

How long can a file name or path be?

A filename component and a full path have different length limits. Microsoft’s file-system protocol specification says a filename must have at least one character and no more than 255 characters. That is a component rule in the [MS-FSCC] specification, not a universal maximum for the entire path.

Rank #4
15.6 Inch Laptop Computer, N4020, 4GB DDR4 RAM, 128GB eMMC,with Windows 11
  • EFFORTLESS EVERYDAY PERFORMANCE: Powered by Intel Celeron N4020 processor and Windows 11 Home system, delivering reliable, low-power efficiency for daily tasks like document editing, email, online classes, and web browsing
  • 15.6-INCH FULL HD DISPLAY: Enjoy immersive visuals on the 15.6" FHD (1920x1080) anti-glare screen with micro-edge bezels. Delivers clear details and comfortable viewing for long study sessions, working on spreadsheets, and video playback
  • RESPONSIVE MULTITASKING & STORAGE: Built with 4GB LPDDR4 RAM and 128GB eMMC storage for smooth daily essential use. Expand your storage by up to 1TB via the integrated TF card slot to easily store movies, photos, and working files
  • ADVANCED CONNECTIVITY: Outfitted with 2x Full-Featured Type-C ports for data transfer, fast charging, and dual-monitor output, alongside 2x USB 3.2 Gen1 ports and a 3.5mm audio jack for complete peripheral compatibility
  • LIGHTWEIGHT & SILENT OPERATION: Slim and portable for effortless travel or commuting. Features a 1MP HD webcam for remote meetings, 38Wh battery with 45W Type-C fast charging, and a fanless silent design for peaceful work environments.

The traditional Windows API value MAX_PATH is 260 characters, but it is not a blanket limit for every Windows path. Microsoft documents long-path behavior for Windows 10 version 1607 and later, subject to Windows configuration and support by the API used by the application. Consequently, a path longer than the traditional limit may work in a suitably configured environment and application, while another app may still fail to open it. See Microsoft’s path-length documentation.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Are file names case-sensitive?

Do not assume that changing capitalization creates a distinct file. Microsoft’s general naming guidance advises against assuming case sensitivity. NTFS supports POSIX case-sensitive semantics, but this is not the default; behavior can also vary with the filesystem and the interface or application handling the name. See Microsoft’s naming guidance.

Best Value
Windows 11 Laptop with i3 Processor 15.6" Work Laptop for College Students
  • 【Efficient Performance】 Powered by Intel Core i3 processor (2 cores, 4 threads, up to 3.4GHz) with 12GB RAM and 256GB SSD. Handles multitasking, office software, online classes, and HD video streaming smoothly. Integrated Intel UHD Graphics 620
  • Backlit Keyboard & Complete Package】Comes with a cool backlit keyboard. Comes with awebcam, dual stereo speakers (8Ω/1.0W each), DC charger, and user manual – ready for late-night studying, online classes, video conferencing, and daily productivity
  • 【Vibrant Display】 15.6-inch Full HD (1920x1080) anti-glare screen with 16:9 aspect ratio delivers crisp images and vivid colors – perfect for studying, watching lectures, or entertainment. Thin-bezel design maximizes viewing area
  • 【Fast Connectivity & Expansion】 Equipped with WiFi 6 (802.11ax) and Bluetooth 5.2 for stable, high-speed wireless. Features 3 x USB 3.0, HDMI 2.1, Type-C (supports PD3.0 fast charging), and a TF card slot expandable up to 2TB – easily connect external monitors, mice, drives, or expand storage for all your files
  • 【Long Battery Life & Portable】 Built-in 11.55V 5000mAh/57.75Wh high-capacity battery delivers approximately 7 hours of mixed-use battery life – enough for a full day of classes and assignments. Lightweight at just 1.63kg (3.6 lbs) and 19.5mm thin, plus a compact packing size – easily slips into a backpack for campus, library, or coffee shop

Why might a name behave differently in another app?

Filesystem capabilities and ordinary Windows interfaces are not identical. The underlying filesystem may support names that common shell or Win32 use does not handle conveniently, including certain reserved device names or names ending in a space or period. Microsoft describes special handling for accessing some such names in its support guidance.

Enumeration, creation, and opening are also distinct operations, and API behavior can differ. A name visible through one interface is not proof that every application can create, list, rename, or open it in the same way. For portable, low-friction names, stick to ordinary characters, avoid reserved device names and trailing ASCII space or period, and keep path length in mind.

Quick Recap

Bestseller No. 1
Bestseller No. 2
Dell Latitude 5420 14' FHD Business Laptop Computer, Intel Quad-Core i5-1145G7, 16GB DDR4 RAM, 256GB SSD, Camera, HDMI, Windows 11 Pro (Renewed)
Dell Latitude 5420 14" FHD Business Laptop Computer, Intel Quad-Core i5-1145G7, 16GB DDR4 RAM, 256GB SSD, Camera, HDMI, Windows 11 Pro (Renewed)
256 GB SSD of storage.; Multitasking is easy with 16GB of RAM; Equipped with a blazing fast Core i5 2.00 GHz processor.
$285.00
Bestseller No. 3
HP 14' HD Laptop, Windows 11, Intel Celeron Dual-Core Processor Up to 2.60GHz, 4GB RAM, 64GB SSD, Webcam, Dale Pink (Renewed)
HP 14" HD Laptop, Windows 11, Intel Celeron Dual-Core Processor Up to 2.60GHz, 4GB RAM, 64GB SSD, Webcam, Dale Pink (Renewed)
14" diagonal, 1366x768 resolution, HD BrightView LED, Glossy NON-TOUCH Display
$245.99

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.