Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversHalloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run Scan×
FREEDOM251

Freedom251 › Blog › file management

How to Fix “File Name Too Long” Errors When Copying or Moving Files in Windows

By Freedom251 Team · · 11 min read

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.

If Windows says a file name or path is too long, the problem is usually the entire path—drive or share, every parent folder, and the file name—not just the characters after the final backslash. The traditional Windows API limit is 260 characters. Windows 10 version 1607 and later can handle longer paths in compatible applications, but long-path support must be enabled and the application must opt in.

The safest order is: measure what is actually too long, try a shorter source or destination path, enable Win32 long paths when you control the computer, and use Robocopy for bulk operations. None of these steps makes every program, File Explorer window, network share, or file system accept unlimited names.

As an Amazon Associate I earn from qualifying purchases.

What “file name too long” really means

Windows often displays a message about a file name when the failing value is the complete path. For example, this path includes the drive, six directory levels, and the file name:

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

C:UsersAlexDocumentsProjectsClientArchive2024Contractssigned-agreement-final-version.pdf

#1 Best Overall
Sale
TOZO A1 Wireless Earbuds Bluetooth 5.3 Light Weight in Ear Headphones | IPX5 Waterproof,2 Mics for AI Calls,Immersive Premium Sound Bass Headset with Charging Case,32 EQ via App Black
  • [Ultra-Lightweight Ear Buds Designed for Small Ears] Each earbud weighs only 3.7g and features a compact, ergonomic in-ear design made especially for small ears. Secure, low-profile, and comfortable for workouts, all-day wear or overnight sleeping.The ultra-slim profile sits flush in your ear with no hard edges poking or rubbing, so you can even sleep on your side without discomfort.
  • [Immersive Stereo Sound with TOZO OrigX Technology] TOZO OrigX tuning delivers clear vocals, balanced mids, and natural stereo sound for music, podcasts, and videos.
  • [Long Battery Life for Daily Use] Get up to 7 hours of playtime on a single charge, with up to 32 hours total using the charging case—ideal for workdays, commuting, and extended listening sessions.
  • [Bluetooth 5.3 & Stable Connection] Bluetooth 5.3 provides fast pairing, stable wireless performance, and reduced dropouts as you move around home or office.
  • [Deep Bass with Clear Vocals] High-performance drivers produce punchy bass while keeping vocals clean and detailed for everyday listening.

Every character in those folders counts toward the legacy MAX_PATH limit. Microsoft documents that legacy limit as 260 characters, including the drive or root, separators, directory names, and the final file name. A short file name can therefore fail when it sits inside a deeply nested destination.

That total-path limit is different from the limit on one individual component. A component is one folder name or the file name itself. The commonly encountered maximum is 255 characters per component, but the exact value comes from the file system and can be checked through the volume information APIs. A path can fail because its total length is too great, because one component is too long, or because the name contains a character that Windows does not permit.

Microsoft’s Win32 documentation describes an approximate extended-length path capacity of 32,767 characters when the appropriate syntax and APIs are used. That figure is not a promise that every volume, shell window, synchronization tool, or third-party application can create or display a path that long. Component limits and application behavior still apply.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

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

Windows 10 version 1607 and later changed the Win32 behavior for many file and directory APIs, but only for applications that are designed to use it. Microsoft explicitly warns: “This isn’t a change that will affect all applications.”

Microsoft’s Maximum Path Length Limitation documentation explains the API behavior, while Naming Files, Paths, and Namespaces covers naming rules and path syntax.

How to tell which limit you hit

Symptom Likely cause Best first action
A file works in one folder but not in a deeply nested folder The combined path is over the legacy limit Move the source or destination closer to the drive root and retry
One folder or file name is extremely long even in the root A per-component limit or invalid name Rename that component and remove prohibited characters
One program fails while another can open the same path The failing program is not long-path aware Use a compatible program or shorten the path
A command-line operation reports errors on a network share UNC syntax, share permissions, server limits, or tool compatibility Test a shorter UNC path and inspect the command output before deleting anything

Try the low-risk fix first: shorten the full path

Shortening the path works even when the application has no long-path support, so it is the best first test for a one-off copy or move. You do not have to rename the final file permanently. Temporarily stage the data in a short location, complete the operation, and reorganize it after the copy succeeds.

Rank #2
Sale
Smart Watch for Men Women Compatible with iPhone Samsung Android Phone 1.69 inch Full Touch Screen IP68 Waterproof Bluetooh Fitness Tracker Heart Rate/Sleep Monitor (Black)
  • 【IP68 Waterproof Multifunctinal Smart Watch】Torjalph fitness activity tracker smart watch is IP68 waterproof technology ,you can wear it when swimming,handwashing,it's rain-proof which means that you perform multiple exercise modes outside without worrying about sweat or rain corroding your fitness smart watch,and this watch equipped with a 230 mAh large capacity battery magnetic charging ,and this sports activity tracker watch can be used 5-7 days If fully charged.
  • 【Larger 1.83'' Full Screen Watch & Multi-dial Selection】1.83 inch full HD color touch screen smart watch for men / women provides excellent 240*284 resolution image quality ,This Bluetooth smart watch offers a better touch experience and remarkable immersion and ,more than 200 watch faces for you to choose from App"Da Fit ", you can change the dial style according to your mood to wear keeping the world on your wrist
  • 【Accurate Activity Tracker Smart Watch 】sports watch activity tracker uses sweat and dust resistant breathable silicone strap, our Fitness Tracker Smart Watch for Android iOS Phones supports 12 sports modes,walking,running,bicycle,swimming,badminton,basketball,football,rope skipping. This bluetooth calls smart watch for men women is lightweight and stylish, bringing more convenient and relaxing sports experience while also providing more protection.
  • 【Your 24 Hour Personal Daily Health Monitor】Fitness watch for women men full touch screen IP67 waterproof bluetooth smartwatch for Android iOS Phones with heart rate blood pressure monitor multifunction Andriod smart watch with steps counter sleep monitor sports fitness watch, monitoring blood oxygen saturation allows you to understand your physical condition in real time to track fitness progress ,to know your health status in time.
  • 【More Functions Bluetooth Call Smart Watch】This fitness activity smart watch full screen for iPhone and Android phones includes a bunch of new features including:The bluetooth smart watch can hang up the phone, receive and display WhatsAPP /Text /Facebook /Twitter /Messenger reminder.Support sedentary reminder, alarm clock, stopwatch, timer,weather information,music control, remote camera control compatible with Android 5.0 and above or iOS 9.0 and above smartphones.
  1. Choose a short staging folder. Create a folder directly under a drive, such as C:Tempin or D:Move. On a network, use the shortest share path you can access.
  2. Shorten the source side. Move or copy the troublesome parent folder closer to the root. For example, replace C:UsersAlexDocumentsCompanyDepartmentProjectYearQuarterWorkingFiles with C:Work.
  3. Shorten the destination side. Avoid placing the item inside several descriptive folders until the transfer has finished. A destination such as C:Archive leaves substantially more room than a long profile, project, and date hierarchy.
  4. Retry with the same application. If the transfer now works, the original failure was consistent with the full-path limit. You can add folders or rename items at the destination in smaller, controlled steps.
  5. Keep names valid. Shortening a path does not fix a name containing prohibited characters or a trailing space or period.

This is a workaround based on the documented full-path limit, not a guarantee that every error will disappear after a rename. If the operation still fails from a short root path, investigate component length, permissions, file locks, the file system, or the application itself.

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

Enable Win32 long paths on supported Windows systems

Long-path support has two separate requirements:

  • The computer must have the LongPathsEnabled registry value set to 1, or the equivalent Group Policy setting must be enabled.
  • The application must declare longPathAware in its manifest and use APIs that support the feature.

Setting the registry value alone does not make File Explorer or every installed program long-path capable. It also does not remove file-system component limits or make relative paths unlimited.

Option 1: Use Group Policy

Group Policy is generally preferable on managed computers because the setting can be documented and applied consistently.

  1. Press Win, type Group Policy, and open Edit group policy if that tool is available on your edition of Windows.
  2. Go to Computer Configuration > Administrative Templates > System > Filesystem.
  3. Open Enable Win32 long paths.
  4. Select Enabled, choose Apply, and then OK.
  5. Restart the affected application. A restart of Windows may be needed so processes that were already running see the change.

On a work or school computer, a domain policy may overwrite a local choice. If the setting is unavailable or returns to its previous state, ask the administrator whether the organization permits long-path support.

Option 2: Set the registry value

Use this method only if you have administrator rights and are comfortable changing a machine-wide setting. Create a restore point or follow your organization’s change procedure before editing the registry.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. Open Windows PowerShell or Terminal as an administrator.
  2. Run Microsoft’s documented command:
New-ItemProperty -Path 'HKLM:SYSTEMCurrentControlSetControlFileSystem' `
  -Name 'LongPathsEnabled' -Value 1 -PropertyType DWORD -Force
  1. Close and reopen the application that performs the copy or move.
  2. If it still behaves as though the setting is off, restart Windows. Microsoft notes that the value can be cached per process after the first affected API call, so a process that started before the change may not recognize it.

To inspect the current value without changing it, run:

Rank #3
New Bee Guitar Cable 10ft Electric Instrument Bass AMP Cord | 6.35mm Jack, Durable Design, Stage and Home Studio Use, Low Noise Shielded Electric Cord for Bass, Keyboard, Amp, Mixer
  • [Low Noise High Fidelity] New bee guitar cord with 22AWG oxygen-free-copper center conductors provides enhanced signal transfer, the PVC insulation material and the high-density stranded copper double shield provide noise rejection for quiet operation
  • [Ideal for Choice] New bee 1/4 straight and right angle metal connectors, ensures a secure connection in any instrument, pedal, or amp jack. L shape great fro on stage guitar stands
  • [Wide Compatible] Suitable for mixer, power amplifier, microphone, effector, decoder, equalizer, electoronic organ, electric guitar, electric bass and other electronic equipments. Widely used in the installation of smart home, karaoke speaker, professional stage audio, etc
  • [Easy Disassemble] Making incidental repairs quick and easy! Very nice, flexible cable
  • [Dont Hesite to Order] 24 hours customer services and professional technology team are standing by
Get-ItemProperty -Path 'HKLM:SYSTEMCurrentControlSetControlFileSystem' -Name LongPathsEnabled

A result of 1 confirms the machine setting, not that a particular application supports long paths. Check the application vendor’s documentation or test the operation from a short staging directory before relying on it for production data.

Why Explorer may still fail

The Windows shell and the underlying file APIs do not have identical behavior. Microsoft warns that a path created through an API might not be interpreted properly by the shell UI. Consequently, enabling the policy is not a promise that dragging files in File Explorer will work. A program can be long-path aware while another program on the same computer remains limited to the legacy behavior.

Use Robocopy for controlled bulk copies and moves

Robocopy is included with modern Windows and is useful when a graphical copy operation fails or when you need a repeatable bulk transfer. Its documented switches distinguish copying from moving:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Switch Effect Important caution
/MOV Copies files and deletes each source file after it has been copied It does not move source directories as a whole
/MOVE Copies files and directories, then deletes them from the source Deletion occurs after copying; verify the destination first
/256 Turns off support for paths longer than 256 characters Do not use it when your goal is to handle long paths
/MIR Mirrors the source directory tree Can delete destination files and directories absent from the source
/PURGE Deletes destination files and directories no longer present in the source Destructive; use only when that deletion is intentional

Read the complete Microsoft Robocopy command reference for the switches available on your Windows release.

Copy first, inspect, then remove the source

For a cautious transfer, copy without a deletion switch first. Open an elevated or ordinary Command Prompt, depending on your permissions, and use a command such as:

robocopy C:WorkSource D:ArchiveSource /E /COPY:DAT /DCOPY:DAT /R:2 /W:5 /LOG:C:Temprobocopy-copy.log

/E includes subdirectories, including empty ones. /COPY:DAT copies data, attributes, and timestamps; /DCOPY:DAT applies the same idea to directory metadata. The retry settings limit repeated waits, and /LOG records the result. Adjust the paths and metadata options to your situation.

Rank #4
BSIMB 15.6" Digital Family Calendar & Chore Chart, No Subscription Fees
  • Digital Family Calendar: BSIMB digital calendar wall touch screen puts an end to your chaotic life. Designed for busy families, the digital calendar keeps you organised and in step with your family. Assign different colours and tasks to each family member to make family scheduling easier and more intuitive.
  • Easy Setup and Auto-Sync: Plug in, connect to WLAN and auto-syn your electric calendar in minutes. Digital wall calendar compatible with Google calendar, iCloud calendar, Outlook calendar, Cozi calendar and Yahoo calendar. Add events directly on the device or through the ecalendar app. Electronic calendar stays current whether you're at work or traveling—no manual updates needed.
  • All-In-One Home Assistant: Smart calendar builds habits and encourage independence with personalised chores. Display daily meal plan to reduce the daily ‘What's for dinner?’ stress. To-do lists keep track of everything you want. Turning chores into valuable achievements with stars and rewards, making life easier and more enjoyable.
  • Manage Anytime Anywhere: BSIMB electronic calendar for family stay connected with the powerful ecalendar app. Access and manage your digital wall calendar anytime, anywhere with free features like stars & rewards, photo screensaver, chore charts, meals plans, to-do lists etc. Electronic planner paid features like Magic Import tailor advanced tools for users with special needs.
  • Stay in Touch with Loved Ones: Share photos or videos from your phone to electronic wall calendar with app, instantly update your life moment, and keep in touch with your family, especially those who are far away; you can also surprise your smart calendar digital wall by sending him a wish card; it's also great for keeping tech-illiterate elders in touch with the youngsters.

Review the return code and log, browse the destination, and compare representative files before removing the original. If the copy is correct and you intentionally want a move, repeat with a documented /MOV or /MOVE command, or delete the source only after your own verification.

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

Example of a move

robocopy C:WorkSource D:ArchiveSource /E /MOVE /R:2 /W:5 /LOG:C:Temprobocopy-move.log

This command is inherently destructive because Robocopy deletes source items after successful copying. Keep a backup until you have confirmed that the destination opens correctly and contains the expected hierarchy.

Do not add /256 by habit

The /256 switch disables support for paths longer than 256 characters. It may be useful when you deliberately need legacy behavior, but it is counterproductive when diagnosing a long-path error. Leave it out unless you have a specific compatibility reason to include it.

Understand mirror and purge deletion

/MIR and /PURGE are not ordinary “copy everything” options. They remove destination items that are absent from the source. A typo in the source or destination can therefore delete data that you expected to keep. Test with a noncritical folder, use a log, and never combine destructive switches with an unverified path.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Advanced path syntax: \? and UNC paths

Windows documents an extended-length syntax for applications that call the relevant APIs directly. A fully qualified local path can use the \? prefix; a UNC network path uses \?UNCservershare.... The prefix tells the API to pass most of the remaining string with minimal modification.

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

This is an API path form, not a universal instruction to paste a prefix into File Explorer. Under the extended syntax:

  • Forward slashes are not treated as normal path separators.
  • . and .. do not receive their usual current-directory and parent-directory meanings.
  • Relative paths cannot use the prefix; the path must be fully qualified.
  • Individual applications and the shell may support the syntax differently.

For example, a program that explicitly supports the API form might receive a path equivalent to \?C:Archivevery-long-name.bin. A network application would use the corresponding \?UNCservershare form. Do not assume that a command, dialog box, backup tool, or shell extension will accept it simply because the underlying API documentation describes it.

Check invalid names and component limits

If shortening the parent folders does not help, inspect the individual name. Normal Windows shell naming rules prohibit these characters:

/ : * ? " < > |

A normal shell name also cannot end in a space or period. Reserved device names and other namespace rules can create failures that look similar to a length problem. Rename the offending folder or file to a simple name containing letters, numbers, spaces, hyphens, or underscores, then retry.

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

Do not confuse a long extension with a long path. The extension is part of the final component, but every parent directory still contributes to the total. Conversely, a 200-character file name can fail even in C: if the file system’s per-component limit is lower than that value. The precise component limit is file-system-specific; Microsoft recommends obtaining it from the volume information rather than assuming that every volume has identical rules.

Choose the right remedy for your situation

Situation Recommended route What to verify
One transfer, and you can rename folders Use a short staging path The destination contains all expected files before reorganizing
Your organization manages Windows by policy Check Enable Win32 long paths The policy remains enabled after refresh and the application supports it
You administer a standalone PC Set LongPathsEnabled to 1 Restart the affected process; reboot if necessary
The application still fails after the setting Use a long-path-aware tool or shorten the path The failure is not caused by an invalid component, permissions, or a file lock
Thousands of files or directories Run Robocopy and log the result Do not use /256; review output before /MOV, /MOVE, /MIR, or /PURGE
Network share or mapped drive Test a short UNC destination and confirm server support Share permissions, server file-system limits, and the client tool’s UNC behavior

Prevent the problem in future folder structures

  • Reserve depth for the future. A folder hierarchy that is just below 260 characters today can exceed it after a project, date, or revision folder is added.
  • Use compact, consistent names. Put verbose descriptions in a document or metadata field rather than repeating them in every directory level.
  • Set a short working root. Teams that regularly handle archives can work from a root such as D:Work and move completed projects to a longer-term structure later.
  • Test the actual application. A policy change is useful only when the software used by your workflow declares longPathAware and handles the resulting paths correctly.
  • Keep a recovery copy for destructive moves. Robocopy’s move, mirror, and purge options can delete data by design; backups and logs are part of the procedure.

When the setting is not enough

If a short path works but the original application still fails after long paths are enabled, the application is the most likely limiting factor. Use its current version if it documents long-path support, switch to a compatible built-in command-line method, or keep the working hierarchy shorter. Do not infer compatibility merely from the Windows version or from the presence of the registry value.

If both short and long paths fail, check the error text for clues about access denied, a file in use, an unavailable network location, synchronization conflicts, or an invalid name. Path length is only one possible cause. Verify the drive is mounted, the account can read the source and write the destination, and no process has an exclusive lock.

For network operations, a local test can separate client path handling from server behavior. Copy one representative file to a short local directory, then to a short UNC path. If the local operation succeeds but the share fails, investigate the server’s file system, share configuration, permissions, and the tool’s UNC implementation rather than repeatedly changing the local registry.

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

Bottom line

A “file name too long” message normally means the complete Windows path has crossed a legacy limit. First reduce the path length; then enable Win32 long paths when both Windows and the application support them. For large transfers, Robocopy can provide a logged, repeatable alternative, but moving and mirror options can delete source or destination data. Treat extended path prefixes as application-level syntax, not as a guaranteed File Explorer fix.

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.

file managementlong pathsROBOCOPYTroubleshootingWindows

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.

Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Crashes, No Sound, or Screen Glitches?Free driver 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.