Geeks in Phoenix

Geek Blog


Understanding long folder and file names in Windows

Did you know that there is a limit to how long a file name can be? Did you know that the folder name is also include in that limit? And what about the path? Let's take a look at long folder and file names in Windows.

Understanding long folder and file names in Windows

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

Now allot of people think that the maximum length for the name of a File in Windows is 255 characters. But that is not really correct. Technically, Folders are also a File but with a special attribute designating it as a Folder.

And Folder and Sub-Folder names are also included in the full File name. So, the actual File name also includes the Folder and Sub-Folder name(s) as well. They all factor into the 255 character limit.

So, when you put all of 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 and/or File names, backslashes and sometimes a volume name (drive letter).

The Path to a Folder or File on your computer will contain a drive letter (C:\, D:\, etc.) at the beginning. A Path to a network Folder or File will contain just two (2) backslashes (\\) at the beginning. And 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 File 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 are too long. The simplest solution is to shrink the Folder or Sub-Folder(s) name(s) and leave the actual File name alone.

Now in my case, I was dealing with a couple thousand File names that were too long. And I could not identify where all of the Files were located. So, I went looking online for a program that could help me with this issue.

What I found was a cool little program called TLPD (Too Long Path Detector).
Too Long Path Detector folder selection screen
It showed me where all of the long file names were. And lucky for me, they were grouped together in Folders and Sub-Folders with fairly 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 I had all of the Paths down to under 225 characters. It was then I was able to copy all of the Files to an external drive for storage.

Comments (1) -

jack reacher

good article

Reply

Add comment

Customer service is #1

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

Bring your computer to us and save

Our in-shop computer repair service  is based on the time we work on your computer, not the time it takes your computer to work!

Contact us

Geeks in Phoenix
4722 East Monte Vista Road
Phoenix, Arizona 85008
(602) 795-1111

Like Geeks in Phoenix on Facebook

Follow Geeks in Phoenix on Twitter

Watch Geeks in Phoenix on YouTube

Geeks in Phoenix is an IT consulting company specializing in all aspects of Computer Repair / PC Repair / Laptop Repair. Since 2008, our expert computer repair technicians have been providing outstanding Computer Repair, Virus Removal, Data Recovery, Photo Manipulation and Website Support.

Geeks in Phoenix have the best computer repair technicians providing computer repair and service in Phoenix, Scottsdale and Tempe Arizona. We offer In-Shop, On-Site and Remote (with stable Internet connection) computer repair service.

Copyright © 2017 Geeks in Phoenix LLC