Jump to content

File Name Too Long - Why Can't I Move Or Copy ?


Recommended Posts

Posted

Could someone please explain, in VERY simple terms "Why file moving does the following ?" and "How, if possible can I solve this WITHOUT shortening the file name ?"

 

When I try to move a folder or file from one external backup drive ( eg Seagate or Toshiba ) to another many many files won't move because the "file name is too long" !

When I try to do the same from the main drive on the laptop to an external backup drive most files move across ok.

 

Sometimes I have folders within folders that have files, the same message appears.

 

Sometimes I have to shorten the name so much that it no longer has relevance to the what the file is.

 

Is there a limit to the length of the file name, how is this limit set and can it be changed ?

Do some external backup drives allow for longer file names ?

Posted

it's the name of the actual file AND the name of the folder and sub-folders you're copying to. It only allows so many characters but I can't remember the number off the top of the my head.
You could try shortening the name of the folders if it helps.

Posted (edited)

I assume you use some up-to-date version of Windows?

On your main drive you have an NTFS file system?

(right click on the drive in Windows Explorer, select Properties and look for file system)

 

As far as I know the maximum path length is still limited to 260 characters.

path=<drive:><directories><filename>

 

What file systems do you have on the external drives (check as described)?

FAT32?

 

Could you locate one of the names too long and try to count the length on your main drive?

 

On my data partition I have about 14000 files, maximum path length is 146.

Edited by KhunBENQ
Posted

The max. length of a filename including folders and subfolders is 255 characters. There is nothing you can do to change that in any settings. this is how the operating system is buildt up.

If you have a folder with files in the root system on a drive, and move it to another drive at the same root level it should not be a problem becasuse the length would be the same.
The problem I think you have is that you don´t think about that you move a folder with files to another disc, and put it in another folder there which makes the path and the filemane longer and over 255 characters that is not allowed.

 

For example: If you have a folder with files in one place that together from the drive letter included up to the filename is 240 characters long. Then you make a new folder named "My Work New files" which is going to be 17 letters more including spaces. If you after that move the folder with already 240 character you get a total of 257, and that is probably the reason why you get an error. Many people don´t think about that.

I hope it helps you,

 

Regards,

Posted
5 hours ago, Get Real said:

The max. length of a filename including folders and subfolders is 255 characters. There is nothing you can do to change that in any settings. this is how the operating system is buildt up.

 

The limit depends upon the operating system and the file system concerned.

 

The OP doesn't state which OS and file system he's using.

 

With NTFS (a very common Microsoft file system) the limit is 32,000 characters.  That's a teensy-weensy little bit more than the 255 that you're suggesting.

 

He might be using DOS, but I very much doubt it.

 

 

 

 

 

 

Posted
6 hours ago, Oxx said:

 

The limit depends upon the operating system and the file system concerned.

 

The OP doesn't state which OS and file system he's using.

 

With NTFS (a very common Microsoft file system) the limit is 32,000 characters.  That's a teensy-weensy little bit more than the 255 that you're suggesting.

 

He might be using DOS, but I very much doubt it.

 

 

 

 

 

 

Ok you are right on one point. The OP didn´t say what operating system, I just took a wild guess on Windows, due to that it´s the most used.
Regarding 255 characters or 260, which is max. path, the 32000 you are referring to has no point. However, if you use Win 10 there is a setting which allows you to
set a higher length of the file path. That is anyway not a very good idea, and can cause troble if moving files between different system or computers.

Posted

You could try zipping them up with eg 7-zip.

Once zipped, Windows will only read the zip file name and not the long name and folder path within the zip file.

Posted

Windows has application programming interfaces (APIs) that programmers can use to interact with applications in the operating system.  The Windows API imposes a maximum filename length such that a filename, including path to file, can't exceed between 255-260 characters.  The limitation is imposed by the Windows API not the file system.

 

Some Apps may allow you to create longer file names but if you try to read or move these files Windows does not know how to handle.

 

 

Posted (edited)
14 hours ago, Oxx said:

 

The limit depends upon the operating system and the file system concerned.

 

The OP doesn't state which OS and file system he's using.

 

With NTFS (a very common Microsoft file system) the limit is 32,000 characters.  That's a teensy-weensy little bit more than the 255 that you're suggesting.

 

He might be using DOS, but I very much doubt it.

 

Indeed the file system limit is about 32k for NTFS.

But the very most existing SW will limit to the traditional "MAX_PATH" of 260.

You won't come very far with longer names (just think about copying to FAT32 external media),

 

The longest path on my W10 system drive is 259 characters.

(replaced name with xxxxxxx)

Quote

C:\Users\xxxxxxx\AppData\Local\Packages\Microsoft.MicrosoftEdge_8wekyb3d8bbwe\AC\#!001\MicrosoftEdge\Cache\WSDIW9VO\2016-04-07_16_02_07-SP_EN_1200x627_yrec_2016-0404_be_a_man_Bolo_jpg_-_Windows_Photo_Viewer_a37f6fc2bb6071660c5da5d2c352b513_a37f6fc2bb6[1].jpg

 

Now waiting for the OP.

 

https://msdn.microsoft.com/en-us/library/aa365247.aspx

https://msdn.microsoft.com/en-us/library/aa365247.aspx#maxpath

Edited by KhunBENQ
  • 2 weeks later...
Posted

Thank you VERY MUCH to everyone for all the information.

I will take time to try an understand and to test some files, as said I am NOT a techie.

I am trying to move files manually as there are so many, with some technical files going back to 2001.

 

I use W7- by choice, fully updated.

Drives NTFS

 

I find that the problem is more when moving between external data drives.     

When moving from main drive to an external data drive, generally there is little or no problem.

As an example I had a backup of a Toshiba laptop on my present laptop, just before the Toshiba died, aged 4 years.  I had manged to save files to an external data drive.   When I tried to move to another external data drive more than 6,000 files from about 30GB would not transfer.   Not my own files or videos etc ( I think ) just general working files for the Toshiba.

 

There may be a difference between a Toshiba and Seagate external drive, I use both but haven't checked.

 

As said I am no techie, but I have already had to either change some file names so much that they no longer bear any relevance to the file itself or just not move them.

 

After all your help I will definitely come back with the results.

Posted

Try reorganising or renaming your folders on the destination drive. As said before the problem is not the filenames in themselves but the full pathnames. You could have a file called file.doc give you this error if the folder you are copying it to has a really long name.

Sent from my SM-P555 using Tapatalk

Posted (edited)

OP, my suggestion would be to make a folder on your desktop, name it Transfer.

 

Cut/Copy all the files/folders you want to transfer to this folder from your sub folders (this will shorten the filename by reducing the file path) and copy/cut/paste to your external from there.

 

An extra step in the process for sure, but you will be able to keep your file hierarchy intact and not make changes to what you are used to.

Edited by chrisinth

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.



×
×
  • Create New...