This post was most recently updated on March 5th, 2025.
3 min read.This article explains another situation where you might run into a “The file names would be too long for the destination folder. You can shorten the file name and try again, or try a location that has a shorter path” error, and how to get around it.
Don’t install “LongPathTool”, which is what all the spam comments online tell you to do. Maybe it’s even on Google/Bing Ads nowadays. Instead, learn to use Windows the way it was meant to be used – without windows.
Read on to expand your consciousness with yet another workaround!
Problem
If you’ve ever used Windows, you might’ve run into this fun error:

You can “fix” this by enabling long file paths – something Windows has supported from around 1995, but it has always been disabled by default for backwards compatibility reasons. The sensibility of this decision can be argued either way, but I guess you rarely need paths over 260 letters long – unless you’re using OneDrive…
Solution
Kinda funny having this disabled by default. But backwards compatibility is important, so I won’t complain about it too much. Besides, there’s an easy UI for enabling longer paths, and it’s called regedit.
And that easy switch fixes like 50% of the problem. So the first part of our 2-part solution starts here:
1. Open RegEdit
Hit win+r, enter “regedit” and hit enter – or just search for “Registry Editor” if your Start Menu works.
2. Enable long paths
Copy-paste the following to the navigation bar to navigate to LongPathsEnabled:
Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem\LongPathsEnabled
And set the value to 1.
3. You are good (with caveats)!
And now your system supports longer paths (over 32000 characters long, to be imprecise)! You’re good. Kind of.
All that said, there’s a bit of a caveat there: since File Explorer is not considered a very important piece of an Operating System (everyone accesses their files from command line anyway, right?), it will not support this easy UI switch (i.e. the registry hack you just successfully executed).
You can access files, sure, but you can’t create new ones or move old ones to paths longer than 260 letters (or 400, with the path and file name combined).
See, the File Explorer, being a very noncentral part of Windows (it’s not like you should use a “window” – such as File Explorer – in Windows, after all), seemingly only gets critical updates like context menu without content and Copilot-integration. Non-critical stuff like “adhering to Operating System -level registry values” or “Honoring Group Policies” aren’t exactly a priority.
And to be fair, it’s meant for “exploring”, not “creating” or “moving” files after all. File Explorer, not File Mover.
(And this brings us to the part 2 of our 2-part solution…)
4. Move your files with something else
So here’s the solution workaround: Forget about using File Explorer and use something else.
Essentially, you have 2 main options:
- Use a better File Explorer option (something that’s still maintained)
- Use a command line -tool like PowerShell or robocopy
So instead of using an UI (like File Explorer), I chose to use PowerShell.
With PowerShell, you can copy the contents of a folder (including subfolders) like this:
Copy-Item -Path "output\*" -Destination "C:\projects\target" -Recurse -Force
(-Recurse makes sure the whole directory is copied over, and -Force means pre-existing files are overwritten)
You could also use Copy-Item, or Rename-Item, depending on your exact use case.
(Dis)honorary mention
Any blog post like this will inevitably receive a barrage of spam along the lines of “Long Path Tool can solve this”, or “You can use Long Path Tool to help you”, or something similar.
This automated robot spam has gone on for years. But the truth is that their little application wants to get paid to do something that can be done using free tools.
And said free tools come with the extra bonus of you not having to share your personal information – or payment information – with some weird company ran by a Nigerian prince.
I’ve posted about the tool and their spam before: https://www.koskila.net/the-specified-path-file-name-or-both-are-too-long-the-fully-qualified-file-name-must-be-less-than-260-characters-and-the-directory-name-must-be-less-than-248-characters/
And finally gave their tool a go – and it’s useless: https://www.koskila.net/long-path-tool-a-well-earned-review/
And there you go. That’s how to use Windows the way it was meant to be used: without using windows.
- Windows Search not finding anything? That might be the default now, but you don’t need to accept it! - March 25, 2025
- “The Copilot key isn’t connected to an action. Choose what you’d like to happen when you press the Copilot key” - March 18, 2025
- How to remove Skype for Business, if it sneaks back onto your machine? - March 11, 2025