If you’ve ever seen this issue, it was probably a simple fix for you. If you’ve seen this error more than twice, then you also know that it can be a complex issue to fix sometimes.
Let’s hope you only run into the easy fix variety, but we’ll prepare you for the less easy, guaranteed to work fixes too.
Why Is Filename Length Even An Issue In Windows?
There’s a long history of filename lengths being a problem for operating systems like Windows. There was a time when you couldn’t have filenames longer than 8 characters plus a 3-character file extension. The best you could do was something like myresume.doc. This was a restriction in place by the design of the file system.
Things got better as new versions of Windows came out. We went from an old, limited, file system to something called the New Technology File System (NTFS). NTFS took us to a point where a filename could be 255 characters long, and the file path length could potentially go up to 32,767 characters. So how can we possibly have filenames that are too long?
Windows has things known as system variables. These are variables that Windows relies upon to function, because Windows will always know what the variables mean and where they are, even when we’re moving bits and bytes all over the place. The system variable MAX_PATH is the one that restricts filenames and file paths to under 260 characters.
Being a variable, you’d think we could change it. No, we should not. It would be like pulling a thread out of a sweater. As soon as one system variable changes, other system variables and components dependent on them start to unravel.
How do we fix it, then?
The Easy Fix
If you’re fortunate, you’ll get the error and know exactly what file’s name is causing the issue. Or at least where to find the file. Maybe you have a filename that looks something like:
It’s obvious who the offender is in this case. Find the file in Windows Explorer, or File Explorer as it’s called in Windows 10, click once on it, hit F2 to rename it, and change that silly filename to something more reasonable. Problem solved.
The Less Easy Fixes
It isn’t always that easy to fix this problem. Sometimes you may not be able to change the names of files or directories for whatever reason.
The following solutions will do the trick for you. They aren’t hard to do.
Move, Delete, Or Copy Files Or Directories Using PowerShell
Sometimes you get an error when trying to move, delete, or copy directories where the character count for the file path is more than 260.
Note that the words directory and folder are interchangeable. We’ll use ‘directory’ going forward. The following PowerShell cmdlets can also be used on files.
When PowerShell opens, you’ll be at the root of your user directory. Follow along assuming C:\Users\guymc is your user directory.
The directory named This is inside the Documents directory. To move into the Documents directory, we use the DOS command cd Documents.
You’ll see the prompt change to C:\Users\guymc\Documents. That’s good. We’re working closer to the directories which will make things easier.
Copy Directory Using Copy-Item
We want to copy the directory This and its contents into ThatNewFolder. Let’s use the PowerShell cmdlet Copy-Item with the parameters -Destination and -Recurse.
-Destination tells PowerShell where we want the copy to be. -Recurse tells PowerShell to copy all the items inside to the destination. Copying leaves the originals where they are and makes all new ones in the destination.
Copy-Item This -Destination ThatNewFolder -Recurse
Move Directory Using Move-Item
Let’s say we want to move the directory This, and all the directories and files in it, to ThatNewFolder. Moving does not leave the original in place.
We can use the PowerShell cmdlet Move-Item with the parameters -Path and -Destination. -Path defines the item we want to move and -Destination tells PowerShell where we want it.
The cmdlet will put This inside of ThatNewFolder. It will also move everything that is inside of the This directory. Move-Item can be used to move files or directories, and it works regardless of file path or filename length.
Move-Item -Path This -Destination ThatNewFolder
To make sure it worked, use the cd ThatNewFolder command to get into ThatNewFolder. Then use the dir command to list the directories in ThatNewFolder. You’ll see the This directory is in there.
Delete Directory Using Remove-Item
If we want to delete the This directory, and everything in it, we use the Remove-Item cmdlet.
The Remove-Item cmdlet has some built-in safety that makes it difficult to delete a directory with things inside of it. In our example, we know we want to delete everything, so we’ll use the parameters -Recurse to make it delete everything inside and -Force to make it do that without asking us if we’re sure for every item inside.
You can use the dir command again to make sure it is gone.
Make Windows 10 Accept Long File Paths
If you know you’re going to be using long file paths and long file names repeatedly, it’s easier to make Windows work for you. No sense using PowerShell to do the work every day.
There are two ways we can 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 that.
Make Windows 10 Home 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 cautious. Accidentally deleting or changing things in here can stop Windows from working completely.
Once you have Registry Editor opened, and your backup made, navigate to the location HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem and find the key LongPathsEnabled.
Double-click on LongPathsEnabled. In the Value data: field, make sure the number 1 is in there. Click OK to commit the change.
Exit Registry Editor and you should be able to work with crazy long file paths now.
Make Windows 10 Pro Or Enterprise Accept Long File Paths
To allow Windows 10 Pro or Enterprise to use long file paths, we’re going to use the Group Policy Editor. It’s a tool that allows us to set policies on how Windows operates at the computer and the user levels.
WiFi, or Wireless Network Connection, has simplified networking and Internet access in our homes. It has enabled wireless music and video streaming, file and printer sharing, and Internet access and sharing among WiFi-enabled laptops, computers, tablets, phones, smart TVs, streaming devices and more.
LAN cables are no longer needed as the same functions are now provided by WiFi Routers.
The Consequences Of Unsecured WiFi
However, it is this same wireless function that can be accessed and exploited by intruders. They can be professional hackers determined to access your network for malicious intent, or your neighbor trying to access your network for free internet to download videos or music.
Intruders can do any of the following:
connect to your network for access to private data in connected devices.
use your Internet connection to perform a malicious act.
cast or stream undesirable video or audio to your connected devices.
use your Internet resource, resulting in a slow and high latency connection.
You obviously don’t want any of these things to happen. So here are 5 ways to secure your WiFi connection.
Change Your SSID & WiFi Access Password Periodically
SSID is the name of your WiFi connection. WiFi routers are provided default SSIDs according to brand and model. However, certain brands and models have known vulnerabilities.
An intruder can use the default SSID to identify the router and then exploit it using its known vulnerabilities. But you can mitigate this threat by assigning a unique SSID to hide what type of router it is.
Closely related to SSIDs are WiFi access passwords. In order for any user to gain access to a router’s wireless connection, that user will need to know both your router’s SSID and its corresponding password. As some routers have known default passwords (and some even have no password at all), assigning a new password will prevent an intruder gaining unauthorized access.
No network is completely safe though. Determined intruders will find ways of obtaining your password through a variety of methods. But these methods usually take time, patience, and creativity.
By changing your SSID and WiFi access password periodically, an intruder who may have already obtained your old WiFi password will have to go through the same time-consuming process again to obtain your new password. Eventually, they may lose interest if the required time and effort far exceeds the rewards gained.
Place Your WiFi Router In a Secure & Strategic Location
Your WiFi router should be located in a way that its signal is only enough to service all areas of your home and not beyond. WiFi signals reaching areas outside your premises, such as the street or houses next door, would invite potential intruders to try and access your network.
To control your WiFi signal strength, adjust the transmit power in your router so it stays confined within the boundaries of your home.
In addition, your WiFi router should be placed in a secure location. Routers have buttons and ports that may allow intruders to bypass any security in place. The WPS button, for instance, allows access to any device connecting by WPS after the button is pressed.
Similarly, some WiFi routers have LAN ports for backward compatibility with wired connections, which are unsecured by default. Preventing physical access to the WiFi router’s WPS button and LAN ports can further secure your WiFi.
Change The Administrator Management Profile Of The WiFi Router
All routers have an administrator profile for maintenance purposes. These profiles usually have accompanying factory-issued admin usernames and passwords. You need to change them.
Failure to do so will enable an intruder with WiFi access to leave a backdoor opening that they can use later on, even after the SSID and WiFi access password have been changed.
Use the WiFi Router Administrative Functions
Some WiFi routers have other functions that help with security.
For example, some routers display a list of all devices currently connected to it through MAC address identification. You can manually check connected devices through their identified MAC addresses to determine whether or not an unknown device has connected.
Other routers have a Whitelist/Blacklist function. This allows you to specify which devices (based on their MAC addresses) can or cannot access your router.
Another administrative function you might want to control is the WPS Pin Entry function. It allows users to access the router by entering a PIN rather than a password and can be abused by intruders to gain backdoor access.
Secure Devices That Connect To Your WiFi Router
Devices that connect to your WiFi router usually store the WiFi password on their systems. That can be a problem.
An intruder with physical access to those devices can view those stored passwords. To counter this threat, you need to make sure all your devices are secured.
There are many reasons why you may want to make your own custom maps. Perhaps you have a wishlist of places you want to visit? Maybe you are tracking a serial killer around the country? Or you are compiling where all the best burger joints are in your particular area Whatever the reason, you can […]
Did you know Gmail is now 15 years old? On April 1, Google revealed new Gmail features to try in 2019. I thought it’d be a great opportunity to highlight the changes, as well as some other features that have been added recently that you may not yet be aware of. Many of us probably […]
Hello and welcome to another awesome article. This time we’re going to create a highly-available Windows share by just using virtual machines, without the need for dedicated hardware, SAN or NAS storage or any special networking requirements. Before we get started on the article let’s see what the use case might be for this type […]
It’s late in the afternoon and I have just received a most interesting task. A client of mine wants to connect to his Microsoft SQL Server over the public network, with no VPN, and he’s asking me how can we best secure this connection. First thing that popped up in my mind is encryption! So […]
Yesterday, I bought a new iPad – the 2019 iPad Air. This doesn’t happen very often. I tend to keep my devices until they are literally on their last legs, wheezing for breath. My old device, the 2013 iPad model, was struggling to operate iOS 10 so I decided to put it out of its […]
I write a lot. It is my occupation, my hobby, and pretty much the one thing I am good at. If I am not writing articles, I am writing books, which means not only do I mess up a lot of keyboards, I also end up hurting my hands and wrists while going at 130 […]
ABOUT HELP DESK GEEK
Welcome to Help Desk Geek- a blog full of help desk tips for IT Professionals and geeks. My name is Aseem Kishore and I am a full-time professional blogger. I graduated from Emory University with a degree in Computer Science and Mathematics.