Geeks in Phoenix

Geek Blog


Understanding long folder and file names in Windows

Updated April 15, 2024

Did you know that Windows limits the length of a file name? Did you know that the character limit also includes the folder name? And what about the Path? Let's look at the long folder and file names in Windows.

Understanding long folder and file names in Windows

I recently recovered files from several Windows computers for a client. He asked that I put them onto an external drive for storage, but I ran into a problem: the file names were too long.

Many people think the maximum length for a File's name in Windows is 255 characters. But that is not correct. Technically, Folders are also files, but they have a unique attribute designating them as Folders.

The full name of the File also includes the Folder and Sub-Folder names. So, the File's actual name also consists of the Folder and Sub-Folder name(s) as well. All of these names factor into the 255-character limit.

So, when you include the names of the Folder, Sub-Folder(s), and File together, it is called a Path. A Path is a string of Folder, Sub-Folder, File, backslashes, and sometimes a volume name (drive letter).

The Path to a Folder or File on your computer will initially contain a drive letter (C:, D:, etc.). A Path to a network Folder and File will contain just two (2) backslashes (\\) at the beginning. A Path can be up to 260 characters in length.

For example, let's say you have a file named 'My Text File.txt' in a Sub-Folder of your Documents Folder called 'Simply Text Files'. The complete Path for it would be:

C:\Users\username\Documents\Simply Text Files\My Text File.txt

The name of the File itself is only 16 characters, but with the name of the Folder and Sub-Folders included, it is 59 characters. And the complete Path is 62 characters. And yes, spaces do count as characters.

So, getting a long name error does not necessarily mean the actual name of the File is too long; it just means the length of the names of the Folder, Sub-Folder(s), and File altogether is. The simplest solution is to shrink the Folder or Sub-Folder(s) name(s) and leave the actual File name alone.

In my case, I was dealing with a couple of thousand File names that were too long. I needed help determining where all of the Files were on the drives, so I went looking online for a program that could help me with this issue.

What I found was a neat little program called TLPD (Too Long Path Detector).
Too Long Path Detector folder selection screen
It showed me where all the long file names were. Lucky for me, they were grouped in Folders and Sub-Folders with reasonably long names.

So, using the output from TLPD,
Too Long Path Detector text file output
I started shortening the Folder and Sub-Folder names. I kept running TLPD until all the Paths were down to under 225 characters. Then, I could copy all of the Files to an external drive for storage.

Free computer diagnostics

Repairing a PC can sometimes be expensive, and that is why we offer free basic in-shop diagnostics. Give one of our professional and experienced technicians a call at (602) 795-1111, and let's see what we can do for you.

Check out our reviews

Geeks In Phoenix LLC, BBB Business Review

Customer service is #1

Here at Geeks in Phoenix, we take pride in providing excellent customer service. We aim to give the highest quality of service  from computer repair, virus removal, and data recovery.

Bring your computer to us and save

Repairing a computer can be time-consuming. That is why we base our in-shop service on the time we work on your computer, not the time it takes for your computer to work! From running memory checking software to scanning for viruses, these are processes that can take some time.

Contact us

If you have any questions, please feel free to give us a call at (602) 795-1111  and talk with one of our Geeks. Or you can send us a message from our contact page contact page , and one of our Geeks will get back to you as soon as possible. Or you can stop by and see us. Here are our hours and location.

Like Geeks in Phoenix on Facebook

Follow Geeks in Phoenix on Twitter

Watch Geeks in Phoenix on YouTube