INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: File Length Error  (Read 6154 times)

rkhorton

  • Junior Woodchuck
  • **
  • Posts: 62
File Length Error
« on: October 07, 2015, 06:51:13 am »

Good Morning! I was wondering if there was any chance that the file length issue could be addressed soon. I believe one of the last Wiki posts was back in 2013. This might be one of those issues linked more to classical rather than pop music. I moved my files to a server and noticed I have lost over a thousand of them after restoring the library. Thanks in advance, rkh
Logged

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8009
Re: File Length Error
« Reply #1 on: October 07, 2015, 08:35:34 am »

Do you mean file *names* being too long?  That's a windows issue, not an MC issue.  Like you said, it's been discussed before, with various expressions to help shorten really long file names.

Unless you're referring to something else?

Brian.
Logged

rkhorton

  • Junior Woodchuck
  • **
  • Posts: 62
Re: File Length Error
« Reply #2 on: October 07, 2015, 11:12:22 am »

Brian, thanks for the response. Your terminology is correct. Being a long time user of MC I am very aware of some of the issues as mentioned. I had forgotten about this until redoing my library. I asked the question because Matt made a statement in the Wiki about this matter and indicated there was a potential workaround but wasn't in the loop for attention even in the distant future. I was hoping since 2013 that there might be a chance of you folks to look at this again.

I understand this is a Windows issue so if I changed over to my Mac, I shouldn't have a problem, correct?

Thanks in advance, RKH
Logged

ferday

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1732
Re: File Length Error
« Reply #3 on: October 07, 2015, 11:23:29 am »

Mac still only supports 255 characters for filename but does support longer paths (1024 iirc)
Logged

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8009
Re: File Length Error
« Reply #4 on: October 07, 2015, 11:42:31 am »

Ferday is correct about Mac filename limits.  I didn't know that until just now.  I created a test file with 250, 255, and 256 characters.  The last one failed.

So here's the question:  How is the combination of Windows and MC failing to "move" or recognize some of your files?  Are the problem files *in* MC?  Or are they in the file system but MC can't see them?  Or something else?

Some concrete examples would help.  I'm thinking that one of two things would work:

Rename files intelligently inside of MC with the Rename, Move, and Copy tool.
Rename files externally to something simple.  Then if the tags are correct, use RM&C inside of MC to name them more intelligently, but still with shorter names.

Brian.
Logged

rkhorton

  • Junior Woodchuck
  • **
  • Posts: 62
Re: File Length Error
« Reply #5 on: October 07, 2015, 01:54:55 pm »

Hey guys, thanks for all the info. What happened was I am now storing all my files on a WD My Cloud Mirror. So last evening I did a clean install of Windows 8.1 and a new install of MC windows 21 latest version. I created the new library and after about 12 hours when the process was complete I received a message something to the effect that 1200 files could not be loaded because the file name was to long. I may still have the message not exactly right as you observed earlier.

According to my son you can't teach an old dog new things but I am open to being schooled about this. So I have a couple of questions:

1. Is the 255 character limit a summing of all the metadata on the particular album or does each line of data, say the artist info, have its own 256 character limit.
2. Can I fix this issue? Is there something in MC that would allow me to see the albums or files so that I could reduce the characters used.

I do appreciate your patience. I'm in my 70's now and technology and terminology have passed me by. However if there is something mechanical, say deleting characters in the metadata, I am game to give it a try.

Regards, RKH
Logged

Fitzcaraldo215

  • World Citizen
  • ***
  • Posts: 217
Re: File Length Error
« Reply #6 on: October 08, 2015, 12:33:13 pm »

In Windows, it is the total path length to the file starting with the drive letter, folder name(s) and file name at the track level, including all punctuation like colon, slashes, etc. I believe the Windows limit for the total path is 240 characters.

Possibly, you can solve all your problems by just using much shorter folder names for your media files starting at the top level and/or or eliminating any intermediate folders, except the album folder itself.  That would be much easier, if it works, than trying to shorten track file names from the bottom up.  If necessary, you can shorten the troublesome album folder names.  That should not hurt anything, as long as it is unique.
Logged

jbbernar

  • Recent member
  • *
  • Posts: 24
Re: File Length Error
« Reply #7 on: October 09, 2015, 07:23:21 am »

MAX_PATH is 260 characters: https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx#maxpath.

I know nothing about Windows programming, but I wonder if it would be possible to use the Unicode versions of the API, which have a limit of 32,767 characters.
Logged

AndrewFG

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3392
Re: File Length Error
« Reply #8 on: October 09, 2015, 07:38:46 am »

MAX_PATH is 260 characters: https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx#maxpath.

I know nothing about Windows programming, but I wonder if it would be possible to use the Unicode versions of the API, which have a limit of 32,767 characters.

Nope. As you say MAX_PATH is 260 characters. In the Ansi API version 260 characters are 260 bytes. But in the Unicode version 260 characters are 520 bytes. But always 260 characters.
Logged
Author of Whitebear Digital Media Renderer Analyser - http://www.whitebear.ch/dmra.htm
Author of Whitebear - http://www.whitebear.ch/mediaserver.htm

Hendrik

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10789
Re: File Length Error
« Reply #9 on: October 09, 2015, 07:45:13 am »

Nope. As you say MAX_PATH is 260 characters. In the Ansi API version 260 characters are 260 bytes. But in the Unicode version 260 characters are 520 bytes. But always 260 characters.

Thats not quite correct. Well, the original statement and yours.
There is a way to get Windows APIs to handle path names longer than that by doing two things, (1) using the Unicode APIs (which we already do), and (2) using the special \\?\ prefix, which disables some of the string parsing in the Win32 API and allows longer path names.

There are however quite a bunch of problems with this. For one, even Windows Explorer (and many other apps) will choke on such long paths after you created them, so its probably not a very good idea to really do that in the first place.
Logged
~ nevcairiel
~ Author of LAV Filters

AndrewFG

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3392
Re: File Length Error
« Reply #10 on: October 09, 2015, 08:46:01 am »

Ah. One learns something new every day.
Logged
Author of Whitebear Digital Media Renderer Analyser - http://www.whitebear.ch/dmra.htm
Author of Whitebear - http://www.whitebear.ch/mediaserver.htm

jbbernar

  • Recent member
  • *
  • Posts: 24
Re: File Length Error
« Reply #11 on: October 09, 2015, 10:02:34 am »

There are however quite a bunch of problems with this. For one, even Windows Explorer (and many other apps) will choke on such long paths after you created them, so its probably not a very good idea to really do that in the first place.

Yes, thanks for the info.
Logged

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8009
Re: File Length Error
« Reply #12 on: October 09, 2015, 10:15:16 am »

Possibly, you can solve all your problems by just using much shorter folder names for your media files starting at the top level and/or or eliminating any intermediate folders, except the album folder itself.  That would be much easier, if it works, than trying to shorten track file names from the bottom up.  If necessary, you can shorten the troublesome album folder names.  That should not hurt anything, as long as it is unique.

This seems like the most relevant advice for the original poster.  Make the total path length (directories plus file name) less than 260 characters and MC should be able to import them.

Brian.
Logged

rkhorton

  • Junior Woodchuck
  • **
  • Posts: 62
Re: File Length Error
« Reply #13 on: October 09, 2015, 02:16:28 pm »

Good Afternoon! First I want to thank again all the programmers and beta team personnel for their time in thinking about and offering a solution to the problem I first posted.

I would like to go back to my original post because I had trouble remembering what the error message I received in MC was referencing. As luck would have it, I ripped a CD yesterday and got this message "These file path names are too long and will be truncated".  All these years ripping within MC I just figured that truncated meant that MC would lop off the extra characters necessary and ignored doing a manual adjustment my self.

Since most all my tunes are classical, there are always a lot of adjustments necessary to track info, titles, misspelling of artist or composer and so on. The adjustments are easy to make. However, you cannot make adjustments to File Name. Experimenting yesterday I was able to correct the problem by reducing the characters in the album title.

Now here is the curious part. When I downloaded the identical files into the library on my MacBook, everything appeared including the 1000 plus files that windows wouldn't allow to be imported. So as a novice I would say, 'go figure'.

Again, thanks to all who looked at, thought about and offered advise on the file length issue. It was greatly appreciated. RKH
Logged

ferday

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1732
Re: File Length Error
« Reply #14 on: October 09, 2015, 02:26:53 pm »

mac natively supports longer path names than windows, but the same filename length

you CAN change the file name on disk, please take a look here

http://wiki.jriver.com/index.php/Rename_move_copy

Logged

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8009
Re: File Length Error
« Reply #15 on: October 09, 2015, 03:54:05 pm »

To expound on what ferday is saying:

A.  On windows the total path length, including the file name *and* the directory names, must be 260 characters or less.  The filename itself must be 255 characters or less.  Under OS X, file names are also limited to 255 characters.  But, the big difference is, the path name, including the directory names, can be much longer.  It can be something a little greater than 1000 characters total.  I just tested with 1000 characters and it worked.  Something like 1020 did not work.  So a much bigger overall limit.

You can fix your files to work on windows too, by changing DIRECTORY NAMES to make them smaller.  In particular, if you have files deeply embedded in multiple directories, you can reduce the names of these directories, or just eliminate any that are redundant.  Like "Music/FLAC/Classical".  That could just be "Music".  As an example.

B.  Once you have files imported into MC, you can use the Rename, Move, and Copy tool to change file and/or directory names in a programmatic fashion.  Ferday has linked you to the wiki article on the tool, should you decide it's something you want to use.

Brian.
Logged
Pages: [1]   Go Up