Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    SaveDocument() file name character limit?

    Cinema 4D SDK
    python windows r19
    2
    3
    689
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • .
      .del
      last edited by

      Hi -
      I switched from Mac to Windows a few months back and am now experiencing a problem with one of my scripts. I'm using SaveDocument() to create some individual files from the models in my main document. The script isn't necessarily failing but I'm getting a alert that my export has failed. The best that I can come up with is that I'm running into a 64 character limit on the filename on Windows. I've taken a test model and re-worked it's name and 64 characters exports but 65 and longer do not.

      I do believe that there was a time when that was a thing but the current OS supports longer filenames. Can you please confirm if it's a limitation in the sdk? or maybe it's a python problem? Either way I'm just looking for some confirmation so I can stop beating my head against the wall.

      Thank You

      1 Reply Last reply Reply Quote 0
      • a_blockA
        a_block
        last edited by

        Hi,

        I really don't think, our API has any additional constraints in regards to filename length compared to the operating system's constraints. If I'm not completely mistaken Windows still has a limit for the length of complete paths, I mean the sum of path and filename.
        Additionally I could imagine there may be even stricter limits depending on the filesystem in use (i.E. exotic network filesystems, old FAT formatted USB devices,...).

        Here's what Microsoft has to say about this: Naming Files, Paths, and Namespaces
        To be honest I haven't read the entire article, but the above mentioned limit seems to be 260 characters.

        Cheers,
        Andreas

        1 Reply Last reply Reply Quote 0
        • .
          .del
          last edited by

          Problem was with the total path length versus the file name length. 256 characters for the entire path and filename.

          1 Reply Last reply Reply Quote 0
          • First post
            Last post