Windows NT Naming Jump: How to Handle Special Characters in File Names

Abstract: Resolve Windows NT Error 123 by replacing reserved characters like colons and slashes with hyphens or underscores in file names.

Created: 2026-08-03 by
Windows NT enforces strict naming rules that prevent the use of specific special characters in file and folder names. These reserved characters include angle brackets, pipes, quotes, colons, backslashes, and question marks or asterisks. Understanding these constraints is essential for maintaining system stability and ensuring compatibility across different Windows versions and network protocols.

The Reserved Characters Explained

The Windows NT kernel reserves certain symbols for internal operations, such as path delimiting, command-line parsing, and wildcard expansion. Attempting to create a file with any of these characters will result in an Error 123: The filename, directory name, or volume label syntax is incorrect. Below is the definitive list of characters that cannot appear in a standard file name:

  • < (Less than)
  • > (Greater than)
  • : (Colon)
  • " (Double quote)
  • / (Forward slash)
  • \ (Backslash)
  • | (Vertical bar or pipe)
  • ? (Question mark)
  • * (Asterisk)

While some of these characters have obvious functions like the backslash for paths or the colon for drive letters, others like the pipe or angle brackets are used in command-line interfaces for redirection and piping data between processes. The system blocks them universally to prevent ambiguity.

Handling Quotes and Semicolons

The original query specifically mentioned semicolons and single quotes. It is important to clarify a common misconception: single quotes (') are actually allowed in Windows file names. They are not reserved characters in the NTFS file system. However, double quotes (") are strictly forbidden because they are used to enclose file paths containing spaces in command-line arguments.

Semicolons (;) are also generally permitted in file names on modern Windows systems. They were historically restricted in older DOS-based environments but are valid in NTFS. If you encounter issues with semicolons, it is likely due to a specific application interpreting them as argument separators rather than a core OS limitation. For maximum compatibility, especially when sharing files with other operating systems or legacy software, it is often safer to avoid them, but technically they do not violate NTFS rules.

Workarounds for Special Character Needs

If your workflow requires identifiers that look like reserved characters, you must use alternative Unicode characters or visual substitutes. This approach ensures your files can be created and accessed without triggering system errors.

  1. Use Unicode Homoglyphs: You can use visually similar characters from other alphabets. For example, use the full-width colon (:, U+FF1A) instead of the standard ASCII colon. Similarly, use the less-than sign from another script if needed. These characters are treated as regular letters by the OS.
  2. Replace with Dashes or Underscores: The most robust solution is to replace prohibited characters with hyphens (-) or underscores (_). For instance, use file-name.txt instead of file:name.txt.
  3. Escape in Scripts: When working with batch scripts or PowerShell, you can escape certain characters using carets (^) or quotes, but this only applies to the command line execution, not the actual file name on disk. You cannot save a file named test<1>.txt even if you escape it in a command prompt.

Long Path Limitations

Beyond character restrictions, Windows NT has historically enforced a Maximum Path Length Limitation, known as MAX_PATH, which is defined as 260 characters. This limit includes the drive letter, colon, backslashes, and the file name itself. While Windows 10 and later versions allow enabling long paths via the registry or Group Policy, older applications may still fail if the path exceeds this threshold. When dealing with deeply nested folders, keep the total length under 260 characters to ensure broad compatibility.

For more information on managing display settings during startup, which can sometimes affect how file paths are rendered in recovery environments, see Unchecking 'Timed Display List of Operating Systems' in Windows Start-up and Recovery. Additionally, if you need to locate files with complex naming conventions over a network, refer to Windows Search: Finding Exact Names with Special Characters in Shared Lan Folders.

Renaming Files Programmatically

If you have existing files with problematic names (created via Linux subsystems or third-party tools), renaming them through the GUI might be difficult if the explorer interface glitches. Use PowerShell to rename files safely. The Rename-Item cmdlet handles special characters better than the standard dialog box in some edge cases.

Rename-Item -Path "C:\Old\Name.txt" -NewName "C:\New_Name.txt"

Always verify the new name does not contain any of the reserved characters listed above. If you are dealing with archives that contain extended Latin characters, be aware that standard ZIP tools might struggle with encoding. Consider using Error Creating Tar Archive with Extended Latin Characters in Windows 10 techniques if you are moving files between different encoding standards.

Common Pitfalls in Batch Processing

When writing batch files, never assume user input for file names will be clean. Always sanitize inputs. If a user tries to pass a file name with a pipe character into a script, the script might interpret it as a command pipeline, leading to unexpected behavior or security vulnerabilities. Use %~1 to properly handle quoted arguments in batch files, which strips the surrounding quotes and prevents injection attacks.

Frequently Asked Questions

Can I create a file named CON or PRN?

No, Windows reserves device names like CON, PRN, AUX, NUL, COM1-COM9, and LPT1-LPT9. Attempting to create a file with these names will fail regardless of whether they contain special characters. You must append an extension or modify the name slightly.

Why does my script fail when I try to read a file with spaces?

Command-line interpreters treat spaces as delimiters between arguments. To fix this, wrap the file path in double quotes. For example, use type "C:\My Folder\file.txt" instead of type C:\My Folder\file.txt.

Is it safe to use emojis in file names?

Yes, modern Windows versions support Unicode emoji characters in file names. However, some older backup software or network shares may not handle them correctly, potentially causing synchronization errors or displaying garbled text.

How do I find files that have illegal names already?

You can use PowerShell with the Get-ChildItem cmdlet and filter using regular expressions to identify files containing reserved characters. This allows you to batch rename them programmatically before they cause further issues with applications.

What happens if I force a file name with a colon using Linux subsystems?

If you create such a file via WSL (Windows Subsystem for Linux), Windows Explorer may display it incorrectly or refuse to open it. It is highly recommended to rename the file within WSL to a valid NTFS-compliant name before accessing it from Windows native applications.

Latest News

How to Display Output of xterm Command in Terminal Screen using Cron

Resolve the inability to display xterm output in a terminal screen from cron by redirecting logs or using wall instead of insecure X11 workarounds.

Read More
Expose Local Server on VPS Preserving Real Client IPs (OS Level)

Resolve VPS logging showing only gateway IPs by configuring reverse proxies to forward real client addresses via X-Forwarded-For headers.

Read More
How to Clear Recent Files History in Linux without Deleting Actual Files?

Clear recent files history in Linux by deleting ~/.local/share/recently-used.xbel without removing the actual files.

Read More
Best HDD Copy Strategy: Manually Syncing and Rewriting Scratch

Resolve data drift between two 4TB hard drives by using rsync with the --delete flag to manually sync and rewrite scratch data for an exact mirror.

Read More
Understanding Bash Prompt Abbreviations: An Overview

Resolve repetitive typing errors by creating and persisting Bash aliases in the .bashrc file for improved command-line efficiency.

Read More
Free Tools and Methods to Log Real-Time Performance Details in Task Manager

Log real-time CPU and memory metrics to CSV files using Windows Performance Monitor Data Collector Sets to troubleshoot system slowness.

Read More
Contact Qatar Airways Customer Service: Phone Number, Help Center, and More

Resolve urgent Qatar Airways reservation issues like flight changes and baggage claims using the US phone number +1801-855-5905 or online self-service tools.

Read More
Windows 11: Alt Codes Displaying Wrong Characters - Solutions

Resolve Windows 11 Alt codes showing wrong characters by verifying the US keyboard layout and enabling Num Lock.

Read More
Run Programs with Elevated Privileges: A Comprehensive Guide

Eliminates the need to type sudo for frequent administrative tasks by configuring .bashrc aliases or functions.

Read More
Dynamically Changing Dates in Excel Formulas Using Cells

Eliminate manual date updates in Excel by using cell references to create dynamic formulas that automatically adjust calculations when input dates change.

Read More
Granting Edit Access to a Specific Excel Sheet in an Office 365 User Email ID-Based Login

Excel Online lacks native sheet-level permissions, so users must split workbooks or use worksheet protection to isolate edit access for specific tabs.

Read More
Creating Network Load on Local Wi-Fi from One PC

Generate sustained Wi-Fi bandwidth load from a single PC using a VM SFTP server to test router stability and throughput.

Read More
Changing the Default Editor for Batch Files in Windows 11's File Explorer

Resolve the issue of batch files opening in Notepad by changing the default editor to a preferred application like VS Code.

Read More
Gain WiFi Connection Minutes Before Losing it by Changing MAC Address

Bypass MAC address filtering to restore WiFi connectivity temporarily when a device is blocked by network administrators.

Read More
Photos Folders Turned Black: Troubleshooting Picture Applications on Windows

Resolve black screens in Windows Photos by resetting the app, updating graphics drivers, and repairing system files.

Read More
Troubleshooting High CPU Temperature Values: A Step-by-Step Guide

Resolve high CPU temperatures and thermal throttling by monitoring with Speedfan, cleaning dust from cooling components, and replacing degraded thermal paste.

Read More
Make cURL establish TLS connection with CA unknown

Resolve cURL TLS connection failures with unknown or self-signed certificates by using the --insecure flag to bypass CA validation.

Read More
Troubleshooting Incorrect Network Metrics Values in Grafana, Prometheus, InfluxDB, and Telegraf

Fix incorrect network metrics in Grafana, Prometheus, InfluxDB, and Telegraf by verifying interface selection, resolving unit mismatches, and handling counter resets.

Read More
Start Another Terminal Window (cmd.exe) Windows Repair/Troubleshoot

Provides step-by-step instructions to access the Windows Command Prompt via bootable media for advanced system repair and troubleshooting.

Read More
Thinkpad P1 Gen 6: Sudden Thunderbolt 3 Dock USB-C Charging Stopped Working

Resolve sudden Thunderbolt 3 dock USB-C charging and internet failure on ThinkPad P1 Gen 6 by updating firmware, resetting the dock, and adjusting power settings.

Read More
ASUS Windows 11 Laptop: Internet Connection Issue with Hotspot

Resolve ASUS Windows 11 laptop spinning wheel issue when connecting to mobile hotspot by resetting network stack, disabling IPv6, and adjusting power settings.

Read More
Developing iOS Project with Firebase: Logging in and Sending Push Notifications

Integrates Firebase to enable secure user authentication and push notifications in iOS applications.

Read More
Troubleshooting Bash Script with Suspected Issues of Spaces, Dashes, Filenames and Quoting

Resolve Bash script failures caused by word splitting, globbing, and special characters in filenames by applying proper quoting techniques.

Read More
Populating OneDrive Folder for Local Backup without Affecting Remote Files

Prevent OneDrive from deleting remote files during Windows reinstallation by unlinking the account or using symbolic links to isolate local data.

Read More
Force First Frame as Keyframe Without Re-encoding: A Quick Solution

Resolve inaccurate seeking and playback glitches by re-encoding video to ensure the first frame is a valid keyframe.

Read More
Find Information in Database Using WSL (Ubuntu) on Windows-10

Resolve database connection issues from WSL Ubuntu on Windows 10 by configuring client tools and network access to query remote or local servers.

Read More
Configuring a New Router with Different Networks: One Family, One Guest

Resolve IP conflicts and isolate guest traffic by configuring a second router with a distinct subnet via its WAN port.

Read More
Quickly Open Multiple Stock Websites with a Single Command

Solve the problem of manually opening multiple stock research websites by creating a single command to launch them simultaneously on Windows, macOS, or Linux.

Read More
Improved Adobe Acrobat Search Experience: Access Advanced Search with Ease

Access advanced search filters like case sensitivity and regex in Adobe Acrobat by clicking More Options in the Find bar.

Read More
Port Forwarding VM via OpenVPN: A Comprehensive Guide

Configure OpenVPN server and iptables to forward specific ports from VPN clients to a virtual machine's internal IP address.

Read More
Understanding Partitions in the 1980s: A Look Back at MS-DOS and Master Boot Record

Explains how the Master Boot Record and partition table enabled MS-DOS to manage multiple disk volumes on a single physical drive.

Read More
Windows 10 Enterprise: Keyboard Not Detected in Managed Organization with Admin Privileges

Resolve Windows 10 Enterprise keyboard detection failures caused by Group Policy restrictions, driver corruption, or USB enumeration errors.

Read More
Can't Find x86_64 Versions of Applications on MacOS arm64 (M1)

Resolve missing x86_64 app issues on M1 Macs by installing Rosetta 2 and reinstalling apps as universal binaries.

Read More
How to Hide Installation Source for an Android App

Manage Android app installation source visibility by using USB transfers or file managers to reduce browser traces and isolate data via work profiles.

Read More
Connecting Momentus 4200.2 ST9808210A Hard Drive via USB Cable

Resolve inability to access Seagate Momentus 4200.2 ST9808210A hard drive by connecting it via USB using a compatible SATA-to-USB adapter and configuring the disk in Windows.

Read More