Skip to content

5000+ Great Articles

Best Articles & Essays: Interesting Articles to Read Online

  • Mario Kart vs Sonic Team Racing: Which is Better? Gaming
  • 15 Best Places To Sell Your Photos Online Cool Websites
  • How to find the best Wi-Fi hotspots near me Computer Tips
  • Terminal Tricks: Use the Terminal as an alarm clock Linux Tips
  • What is Microsoft Windows Search Index? Windows 10
  • How to Find and Calculate Range in Excel MS Office Tips
  • How Websites Work: Learn what works Tools Review
  • How to fix if PS5 Not Connecting to Internet? Gaming

How To Fix ‘Filename Is Too Long’ Issue In Windows

Posted on October 8, 2020 By blog_786 No Comments on How To Fix ‘Filename Is Too Long’ Issue In Windows

If you’ve ever encountered this problem, it might have been an easy solution for you. If you’ve seen this error more than twice, then you also know that it can be difficult to fix at times.

Hopefully you only come across a lot of simple fixes, but we’ll prepare you for less simple, guaranteed to work fixes.

How To Fix ‘Filename Is Too Long’ Issue In Windows

Why is file name length an issue in Windows?

The long history of file names is a problem for operating systems such as Windows. There was a time when filenames could not exceed 8 characters plus a 3-character file extension. The best you could do is something like myresume.doc. This limitation is due to the design of the filesystem.

With the release of new versions of Windows, things have improved. We have moved from the old limited file system to the so-called new technology file system (NTFS). NTFS has brought us to the point where a file name could be 255 characters long and a file path could potentially be up to 32,767 characters. So how can we have filenames that are too long?

How To Fix ‘Filename Is Too Long’ Issue In Windows

Windows has things known as system variables. These are variables that Windows depends on because Windows will always know what the variables mean and where they are, even as we move bits and bytes all over the place. The MAX_PATH system variable limits file names and file paths to 260 characters.

You might think that being a variable, we can change it. No, don’t. It’s like pulling the thread out of a sweater. As soon as one system variable changes, other system variables and their dependent components begin to unravel.

– /

How do you fix this then?

Easy Fix

If you’re lucky, you will receive an error message and find out exactly which filename is causing the problem. Or at least where to find the file. Maybe you have a filename that looks something like this:

C: User guymc Documents My Resumesresumewithanamesolong, which causes problems and becomes part of an article by some guys on the website howdoyoulikemenow.docx

It is quite obvious who is the culprit in this case. Find the file in Windows Explorer or File Explorer as it is called in Windows 10, click on it once, press F2 to rename it, and change that stupid filename to something more sensible. The problem has been resolved.

Least Easy Repairs

Solving this problem is not always easy. Sometimes, you cannot change the names of files or directories for some reason.

The following solutions will help you. It’s not hard to do.

Move, delete or copy files or directories using PowerShell

Sometimes you receive an error message when you try to move, delete, or copy directories with more than 260 characters in the file path.

Note that the words “directory” and “folder” are used interchangeably. From now on we will use the “catalog”. The following PowerShell cmdlets can also be used with files.

The file path may look something like this:

C: Users guymc Documents This Is Exactly The Precise Directory Path That I Need To Have To Keep My Files Sorted In A Manner That Makes Sense To Me So Lets Pretend This Is An Actual Filepath That You Might Also Have On Your Windows Computer And Not Over Think It Document.docx

This file path is 280 characters long. Therefore, we cannot copy the directory from there to another location using the usual copy-paste method. We get the “Destination path too long” error.

How To Fix ‘Filename Is Too Long’ Issue In Windows

Let’s suppose that for some reason we cannot rename the directories where the file is attached. What are we doing?

Open PowerShell. If you haven’t used PowerShell yet, check out our article Using PowerShell for Home Users – A Beginner’s Guide. However, you can follow these steps without reading the article.

When PowerShell opens, you will be in the root directory of your custom directory. Let’s assume C: Users guymc is your user directory.

A directory named This is located inside the Documents directory. To go to the Documents directory, we use the DOS command cd Documents.

How To Fix ‘Filename Is Too Long’ Issue In Windows

You will see that the prompt changes to C: Users guymc Documents. It’s good. We work closer to directories, which will make things easier.

Copy catalog using Copy-Item

We want to copy the This directory and its contents to ThatNewFolder. Let’s use the Copy-Item PowerShell cmdlet with the -Destination and -Recurse parameters.

-Destination tells PowerShell where we want to place the copy. -Recurse tells PowerShell to copy all items inside to the destination. When copying, the originals remain in place and all new ones are placed in the destination.

Copy element of this -Destination ThatNewFolder -Recurse

Moving a directory using Move-Item

How To Fix ‘Filename Is Too Long’ Issue In Windows

Let’s say we want to move the This directory and all directories and files in it to ThatNewFolder. The original does not stay in place when moved.

We can use the Move-Item PowerShell cmdlet with the -Path and -Destination parameters. -Path defines the element we want to move, and -Destination tells PowerShell where we want it to.

The cmdlet will put This inside ThatNewFolder. It will also move everything inside that directory. Move-Item can be used to move files or directories, and it works regardless of the file path or file name length.

Move-Item -Path This -Destination ThatNewFolder

How To Fix ‘Filename Is Too Long’ Issue In Windows

To verify that this worked, use the cd ThatNewFolder command to get into the ThatNewFolder. Then use the dir command to list directories in ThatNewFolder. You will see that this directory is there.

Remove directory with Remove-Item

How To Fix ‘Filename Is Too Long’ Issue In Windows

If we want to remove this directory and everything in it, we use the Remove-Item cmdlet.

The Remove-Item cmdlet has some built-in security that makes it difficult to remove a directory with content inside it. In our example, we know we want to delete everything, so we will use the -Recurse options to delete everything inside, and -Force to do this without asking us if we are sure of every element inside.

Keep in mind! It will be extremely difficult to recover anything deleted in this way. You can try the methods described in the article “How to recover accidentally deleted files”, but don’t expect too much.

Remove-Item This -Recurse -Force

How To Fix ‘Filename Is Too Long’ Issue In Windows

You can use the dir command again to see if it’s gone.

Make Windows 10 accept long file paths

If you know that you will consistently use long file paths and long file names, it will be easier for you to get Windows to work for you. It doesn’t make sense to use PowerShell for your day to day work.

There are two ways to do this. One is for Windows 10 Home users and the other is for Windows 10 Pro or Enterprise users. These methods may work for Windows 8.1 or earlier, but we cannot guarantee this.

Force Windows 10 Home to accept long file paths

To make Windows 10 Home accept long file paths, we need to open the Registry Editor. If you haven’t worked in Registry Editor before, be careful. Accidentally deleting or changing anything here can completely stop Windows from working.

Always back up the registry before making changes. Find out everything you need to know about it in our comprehensive guide to backing up and restoring your Windows Registry.

After opening Registry Editor and creating a backup, navigate to the HKEY_LOCAL_MACHINE SYSTEM CurrentControlSet Control FileSystem folder and find the LongPathsEnabled key.

How To Fix ‘Filename Is Too Long’ Issue In Windows

Double click LongPathsEnabled. Make sure there is 1 in the Value field. Click OK to confirm the change.

How To Fix ‘Filename Is Too Long’ Issue In Windows

Close the registry editor, and now you can work with insanely long file paths.

Make Windows 10 Pro or Enterprise accept long file paths

To enable Windows 10 Pro or Enterprise to use long file paths, we’re going to use the Group Policy Editor. It is a tool that allows us to set Windows operating policies at the computer and user level.

We have several articles on using Group Policy for things like disabling or enabling Internet Explorer settings or adding a message to the login screen.

Open the Group Policy Editor by going to the start menu and typing gpedit. The first result should be a change in Group Policy. Double click on it.

How To Fix ‘Filename Is Too Long’ Issue In Windows

After opening the Group Policy Editor, navigate to Computer Configuration> Administrative Templates> System> File System. There you will see the Include Win32 Long Paths policy.

How To Fix ‘Filename Is Too Long’ Issue In Windows

Double click on it to change the policy setting. Change it from Disabled to Enabled, then click OK to commit the change.

How To Fix ‘Filename Is Too Long’ Issue In Windows

The policy may not take effect immediately. However, you can force a Group Policy update.

That’s it

There are other ways to get around long file names and file paths, but here we’ve covered the simplest and most efficient methods.

–

Share this:

  • Twitter
  • Facebook
How-To

Post navigation

Previous Post: How To Create a Password Reset Disk The Easy Way
Next Post: 5 Ways To Secure Your WiFi

Related Posts

  • Pushbullet vs Join | What to Choose? How-To
  • How to Block Adult Websites on your Window PC How-To
  • How to Access Router Remotely How-To
  • How to Retrieve Archived Emails in Gmail How-To
  • WWDC 2020- How to Get iOS 14 on Your iPhone? How-To
  • How to Use Internet Effectively to Consume Information How-To

Leave a Reply Cancel reply

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

Archives

  • September 2023
  • August 2023
  • July 2023
  • June 2023
  • May 2023
  • April 2023
  • November 2022
  • September 2022
  • August 2022
  • July 2022
  • June 2022
  • May 2022
  • April 2022
  • March 2022
  • February 2022
  • January 2022
  • December 2021
  • November 2021
  • October 2021
  • September 2021
  • August 2021
  • March 2021
  • October 2020
  • September 2020
  • August 2020
  • July 2020
  • June 2020
  • May 2020
  • April 2020
  • March 2020
  • December 2019
  • July 2019
  • May 2019
  • April 2019
  • January 2019
  • December 2018
  • November 2018
  • October 2018
  • September 2018
  • August 2018

Categories

  • AI Tools & Guides
  • Amazon Web Services
  • Apple Watch
  • Computer Tips
  • Cool Websites
  • Featured Posts
  • Free Software Downloads
  • Gadgets
  • Gaming
  • General Software
  • Google Software/Tips
  • Hardware
  • Help Desk
  • How-To
  • iOS
  • iPad
  • iPhone
  • islamic Books
  • Linux
  • Linux Tips
  • Mac OS X
  • macOS
  • MS Office Tips
  • Networking
  • Office Tips
  • OS X
  • Product Reviews
  • Reviews
  • Safari
  • Smart Home
  • Smartphones
  • Software Reviews
  • technology
  • text
  • Tools Review
  • Troubleshooting
  • Tutorials
  • Uncategorized
  • Urdu Books PDF
  • Web Site Tips
  • Windows
  • Windows 10
  • Windows 7
  • Windows XP Tips
  • Wordpress
  • A Simple Trick to Get 50% Discount on Audible for Three Months
  • How to reset your SIM card
  • This Simple Trick Lets You Play YouTube in the Background on iOS
  • How to go Back to the old YouTube Layout (2013)
  • How to Bypass Chromecast DNS and Circumvent Geo Blocking
DMCA.com Protection Status

Recent Posts

  • 10 Things to Check Before Publishing a YouTube Video
  • MailTag: Real-time Email Tracking, Made Easy
  • Pokemon Sleep: what is it and how to play
  • How to Respond to Messages on Instagram (Mobile and PC)
  • How to reset your SIM card

Recent Comments

  1. This Simple Trick Lets You Play YouTube in the Background on iOS on YouTube Not Working? Here Are Quick Fixes To Try
  2. How to Bypass Chromecast DNS and Circumvent Geo Blocking on 5 Cool Websites to Find Good Movies and TV Shows on Netflix
  3. 5 Cool Websites to Find Good Movies and TV Shows on Netflix on check netflix video quality internet explorer
  4. SmartDNS vs VPN “What’s the Difference?” on How to Watch Apple TV on Roku
  5. How to go Back to the old YouTube Layout (2013) on 10 Things to Check Before Publishing a YouTube Video
  • How to Delete the Windows.old folder in Windows 7/8/10 Featured Posts
  • 10 of the Best Apps to Scan and Manage Receipts Software Reviews
  • 10 Most Common Printer Problems and fixation Computer Tips
  • How To Batch Rename All Of Your MP3 Metadata Files How-To
  • Fix COM Surrogate has stopped working in Windows 7 Help Desk
  • How To Use The Windows 10 Video Editor Windows 10
  • Update Apple’s Safari Browser in Windows How-To
  • Change the Registered Owner Name in Windows 7/8/10 How-To

Copyright © 2023 How To Blog.

Powered by PressBook News WordPress theme

Go to mobile version