4 Replies Latest reply on May 30, 2008 5:12 AM by Prachu

    MAC Movie file name/path limitation

    Prachu
      Hi,

      Is there any limitation on max no of characters in file name on MAC version of Director MX 2004?.
      it works fine on windows, but on MAC it reports "Unable to load file". When i reduced the folder which
      contained the movie to less than 31 chars, then it works fine.

      Have any of you experienced this problem?Is this really a limitation on MAC Director MX 2004?
      Is there any official documentation regarding this issue??

      If this is actually a limitation on MAC Director MX 2004, is it possible to solve this with out renaming the
      folders??

      Any help is highly appreciated.

      Thanks
        • 1. Re: MAC Movie file name/path limitation
          fazstp Level 2
          When any file name on the mac goes over 31 chars it gets truncated.

          Something like this;
          "Mac HD:Users:prachu:Desktop:This Is A Long Long Filename.txt"

          Will be seen by Director as something like this;
          "Mac HD:Users:prachu:Desktop:This Is A Long Long #2E2686.txt"

          It gets truncated to 31 chars ( including extension ) with the last 7 chars in the file name replaced by a hex string. You can get this name with BuddyAPI.

          put baShortFileName( "Mac HD:Users:prachu:Desktop:This Is A Long Long Filename.txt" )
          -- "Mac HD:Users:prachu:Desktop:This Is A Long Long #2E2686.txt"

          put baLongFileName( "Mac HD:Users:prachu:Desktop:This Is A Long Long #2E2686.txt" )
          -- "Mac HD:Users:prachu:Desktop:This Is A Long Long Filename.txt"

          You need to supply the short file name in order to link to it or open a file with fileIO.

          • 2. Re: MAC Movie file name/path limitation
            Prachu Level 1
            Hi fazstp,
            Thanks for the quick reply. That solved the problem.
            The only cache is the path must be a full path. Thats fine.

            I have one More question. Does MAC Director Supports '/' as path separator or does it have to be ':'.
            So far only ':' works.

            thanks
            • 3. Re: MAC Movie file name/path limitation
              fazstp Level 2
              Director only supports the colon delimiter on Mac.

              put the last char of the movie path
              -- ":"


              If you need it you can get the unix file name with BuddyAPI

              put baUnixName( "Mac HD:Users:prachu:Desktop:This Is A Long Long Filename.txt" )
              -- "/Users/prachu/Desktop/This Is A Long Long Filename.txt"


              Can be useful if you're trying to do shell scripts.

              • 4. Re: MAC Movie file name/path limitation
                Prachu Level 1
                Hi,

                There is also another function called baHFSName(only Mac Implemention), which also returns a
                short file path and also replaces the '/' with ':'. It also takes care of the identifying the hard disk volume name.

                So a path like
                "/Director/This Is A Long Long Filename.txt" gets converted to
                "Macintosh HD:Director:This Is A Long Long #2E2686.txt".

                This does both. Shortening the path and identifying the volume name.

                Regards
                Prasannaa