Lỗi the name is too long for defined folder năm 2024

This is an error you might have experienced more at work than at home. You decided to copy a file or take a backup of it to another location or drive, you browse to the source location and starts copying. But you get this error, instead.

Lỗi the name is too long for defined folder năm 2024
Lỗi the name is too long for defined folder năm 2024

Lỗi the name is too long for defined folder năm 2024

Why does it come?

There is a pre-defined character limit beyond which you cannot name a file or folder, and it varies from one OS to another. Mostly it varies between 256 and 260 characters. This is the character limit for a file name, which excludes the file path under which it is located, like “C:\Documents and Settings\Test User\Desktop\test file.txt”. But, when you copy a file from one location, it takes into account the entire file path. So, if the file is residing under a folder which is too deep or too long, that has a length beyond the set-limit, you will get errors like the ones shown above.

How do I know that the file path length is causing the issue?

  • One way you will know is definitely from the error messages similar to the ones above which clearly mentions the problem.
  • Some other times, it won’t. You will simply get a message saying ‘Cannot Copy’ in the title.
  • Or, some other times, the files won’t open properly. They would open and close instantly without giving any errors.
  • Also when you right-click such files, the number of options available in the right-click menu would also be limited compared to other files.

Lỗi the name is too long for defined folder năm 2024

All these are caused by those incredibly long file paths.

So, how can I copy the files or fix this issue?

There are a couple of ways you can fix this easily without the use of any 3rd party applications.

  1. Check the folder path, and shorten some of the folder names in between thereby reducing the file path length. You don’t necessarily need to put the folder name as ‘Mission Impossible Three’ when you can still recognize it as ‘MI 3.’
  2. The main thing many people miss when they save a file or folder their Desktop is that the actual path to that folder in desktop is either ‘C:\Documents and Settings\%username%\Desktop’ or ‘C:\Users\%username%\Desktop’ depending on your OS. So as you can see, its already longer than you thought it is. Go to Start — Run and type ‘cmd‘ and press OK, or click start/press windows key and type ‘Command Prompt‘. Once in the command prompt window, type the following command :

subst V: “C:\TheRidiculouslyLongFolderNameWhichYouDontNeedAtAll” ,

where

subst = substitute command

V = a drive letter of my choice, you can select your own.

C:\TheRidiculouslyLongFolderNameWhichYouDontNeedAtAll = the file path you want to shorten. Change it according to your situation.

Lỗi the name is too long for defined folder năm 2024

So, basically this command would convert the entire folder path you provide in the command, into a single temporary drive letter, like V in this case, which gets created in My Computer. Now all you need to do is, go to the My Computer, and open the V drive, and copy the data from there.

Lỗi the name is too long for defined folder năm 2024

Note : To remove the new drive from My Computer, go to Command Prompt again and type subst V: /d

There you have it, try this the next time you get the error, and see how it goes. If you are still confused, let me know in the comments section below.

thanks for keeping the thread updated with the progress & apologies for getting back in touch with you with a slight delay. While this has been discussed here previously, I’d happily explain in a bit more depth under this conversation for posterity.

It would be worth noting that there are files that your applications can't process correctly because they have file paths that are too long.

This behavior is present if there are more than 255 characters in the entire file path. This means from the C:\ all the way to the extension of a file.

As an example if you had a test.txt file in your Dropbox that had the following path:

C:\Users\YourName\My Documents\Dropbox\test.txt

This file would have a path that is 47 characters long.

The Dropbox desktop application can read and write to locations that are longer than 255 characters, which means that files will sync to and from those locations, however, the applications used to open or save said files (e.g. Word, Notepad, Excel, &c.) might not support reading from or writing to these locations with long file paths and may show error messages when trying to open, save or edit them.

Hopefully my message addresses your initial inquiry, however please feel free to check back with us here if you have any additional questions or thoughts!