filenames too long, how do I find them?
I have lots of filenames in my archive which are too long. How can I find them all so that I can fix them?
Thanks
MacBook Pro, Mac OS X (10.1.x)
I have lots of filenames in my archive which are too long. How can I find them all so that I can fix them?
Thanks
MacBook Pro, Mac OS X (10.1.x)
As per this article : macOS Sierra: Show or hide filename extensions
A filename extension appears at the end of some filenames, and looks like a period followed by a few letters or words (for example, .jpg). A file’s filename extension shows what type of file it is and what apps can open it.
Filename extensions are usually hidden in macOS, but if you find them useful, you can show them. If extensions are hidden, macOS still opens files with the proper apps.
For all files
Yes, exactly.
As I migrate to OneDrive I am told I have some 300 files with names too long. I want to find these 300 files so that I can shorten their name.
Thanks
Pydio appears to be an open source file collaboration system probably somewhat along the lines of Microsoft SharePoint.
The Mac operating system has support for effectively unlimited file name and file path lengths. Unfortunately Windows has a limit of only 260 characters for its maximum file path. See https://msdn.microsoft.com/en-gb/library/windows/desktop/aa365247%28v=vs.85%29.a spx?f=255&MSPPError=-2147217396
Note: In theory you can now use file paths of 32,767 characters in Windows however programs have to be re-written to take advantage of this and even Microsoft's own programs often have not. As a result for the majority of cases you do still have a 260 character limit.
Note: It is the file path length rather than the file name length that is the real problem, one very long file name might be ok but several shorter file names making a total longer than 260 characters would not.
What is really annoying is that Microsoft Office for Mac even though it is running on a Mac which can support much
longer file paths also chokes if you use longer file paths. Clearly Microsoft are artificially crippling the Mac version of Office to match the limitation of the Windows version.
In this case I suggest you are going to need to write a script. The following prints the length and then the file path recursively.
find . | perl -l -pe 'print length'
This might be a starting point. You could then search the result in another command for numbers greater than the danger level.
In what archive?
In my company we have an archive called Pydio. It is a file management tool I suppose. I am trying to migrate to OneDrive and the length of the file names has surfaced....
I'm not familiar with Pydio so you can wait and see if anyone here uses it and responds or you could contact the developer.
Do you mean that you want to generate a list of all files with names longer than, say, 30 characters so you can rename them?
C.
I think you have hit the nail right over the head!
Unfortunately I have no idea how to write scripts... I will have to find some help to be able to make good your suggestions.
Thanks
filenames too long, how do I find them?