INTERACT FORUM

More => Old Versions => JRiver Media Center 19 for Windows => Topic started by: mstan on December 04, 2013, 08:54:56 am

Title: File Name Length
Post by: mstan on December 04, 2013, 08:54:56 am
MC has reported 19 files failed to import because the file name is too long.    Is this a Windows limitation as Mac OS has imported them just fine with the, admittedly, very long file name path (these are classical files)?
Title: Re: File Name Length
Post by: connersw on December 04, 2013, 09:07:25 am
Yes, this is a Windows limitation.

http://windows.microsoft.com/en-us/windows-vista/file-names-and-file-name-extensions-frequently-asked-questions

What is the maximum length of a file name?

Windows usually limits file names to 260 characters. But the file name must actually be shorter than that, since the complete path (such as C:\Program Files\filename.txt) is included in this character count. This is why you might occasionally encounter an error when copying a file with a very long file name to a location that has a longer path than its current location.
Title: Re: File Name Length
Post by: mstan on December 04, 2013, 09:13:29 am
Yes, this is a Windows limitation.

http://windows.microsoft.com/en-us/windows-vista/file-names-and-file-name-extensions-frequently-asked-questions

What is the maximum length of a file name?

Windows usually limits file names to 260 characters. But the file name must actually be shorter than that, since the complete path (such as C:\Program Files\filename.txt) is included in this character count. This is why you might occasionally encounter an error when copying a file with a very long file name to a location that has a longer path than its current location.


This is 2013 and Windows still has this limitation?  As one of Nick Cage's characters would say, "SON OF A B*TCH!"
Title: Re: File Name Length
Post by: 6233638 on December 04, 2013, 09:37:53 am
It should be possible to have a total path length of 32,767 characters... but I've no idea how to make use of it.

Quote from: http://msdn.microsoft.com/en-us/library/aa365247.aspx
The Windows API has many functions that also have Unicode versions to permit an extended-length path for a maximum total path length of 32,767 characters. This type of path is composed of components separated by backslashes, each up to the value returned in the lpMaximumComponentLength parameter of the GetVolumeInformation function (this value is commonly 255 characters). To specify an extended-length path, use the "\\?\" prefix. For example, "\\?\D:\very long path".
Title: Re: File Name Length
Post by: dean70 on December 04, 2013, 02:57:09 pm
Supposidly at the Win32 API level you can have a 32k path length using the "\\?\" prefix, but MS decide in their infinate wisdom to retain the 260 char path limit from the 80's due to historic C runtime limitations. I mean really   ::)
Title: Re: File Name Length
Post by: Matt on December 04, 2013, 03:16:45 pm
Like others say, the shell limits you to 260 and the file system (normally) has a much larger limit.

JRiver performs a sanity check on import (on Windows only) and rejects filenames longer than the shell can safely support.  This is done because we don't want to create other problems later (why can't I find my file in Explorer, why is my sidecar not working, etc.).

I think we might someday remove the JRiver safety check on import.  After that, we would handle any length file but not create a filename longer than 260 characters ourselves.  We would make this change sometime when we were happy to deal with possible problems, which won't be in the near future.
Title: Re: File Name Length
Post by: mstan on December 04, 2013, 03:25:48 pm
Not a big deal.   It is just a handful of files.  I'd rather you spend your time adding the video features to the MAC version :).