This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

File Name Length

Dear All

What is the max file name length for a file in a traditional folder.

Thank you

Parents
  • I've been trying to work this out for ages. A couple of days ago I did some research and this is what I found.

    This will be quite long as I was going to post this separately but might as well be here.

    Some history:

    We have an annoying file system where documents from one division still are stored on a windows server drive and are imported (linked) to M-Files to have them populated with metadata with various scripts.

    We've enabled the option that's in Joonas' link, which hasn't solved anything. I've just been to busy to try and research this further.

    As ssential has said, it truncates the file name, and when it's importing, creates errors as it tries to constantly import the longer file name, but cant due to the length, then truncates it - but the truncated file is already there. If that makes sense.

    As a result, many files on our server aren't moved across.

    But I don't believe the 260 limit is the case. I instead thing the length of the file name (not including the folders) maximum length (not including file type extension, i.e. ".pdf") is 100 characters.

    Here is a real example that I've seen just now (causing a critial error in the event log) - everything has been randomized for security, but the string lengths are the same in the same format:


    Processing the contents of the external source "2019 (\OURSRV1\Fold\2019)" failed.
    Processing of the source file "\OURSRV1\Fold\2019\xx-xxxx\Workxxxx documentation\ABC1234 XXXX - XX - XXX ABCEIT Street IRUEHWAYER JSU 8272 - AA Prohyws abc 123 - abcD - ORDER ? JS82JS8J AUDIT.pdf" failed.
    Updating the external link of the file "ABC1234 XXXX - XX - XXX ABCEIT Street IRUEHWAYER JSU 8272 - AA Prohyws abc 123 - abcD - ORDER ? JS82.pdf" failed.
    Adding the linked file failed.
    File "\OURSRV1\Fold\2019\xx-xxxx\Workxxxx documentation\ABC1234 XXXX - XX - XXX ABCEIT Street IRUEHWAYER JSU 8272 - AA Prohyws abc 123 - abcD - ORDER ? JS82.pdf" already exists.

    The original file & path length (starting from \OURSERV1.....) as in our windows server is 165 Characters Long

    The original file name length itself (not including folders) is 114 characters long.

    It then truncates the file and path length to one that is 155 characters long - or a file name that is 104 characters long.....


    If the M-Files file length is based on the traditional folder length as viewed in M-Files, so the "\OURSRV1\Fold\2019" is replaced with "M:\OUR M-Files\Fold\2019", the string length is only five characters longer, resulting in the above total lengths being changed to 170 and 160 characters respectively.

    There are about 20 other examples that I've looked at on our event log.

    All of which have total file lengths no longer than 104 characters including the ".pdf" - or a length of 100.

    I've also deleted the "f" off ".pdf" and low and behold it truncated the name to 100 characters.

    100 characters is also the maximum length of a single line text property, which "Name or title" is.

    I've also tried setting the name/tile based on a multi-text property, but this simply gets cut to 100 characters again.

    So to answer your question, the longest file name you can have in a folder is 100.
  • I get problems with file lengths if the name of the views are too long and you go some levels deep.

Reply Children