6 Replies Latest reply on Nov 18, 2015 6:18 PM by user19752

    File export inside sub folder is not working

    sudha

      Hi All,

       

      I have tried to export the documents inside the subfolder and the share path is :

       

      filewin:/D:/Documents/$FolderName/$filepath1

       

      I am getting that "sample1.doc could not be created more  on this disk.

       

      Where as,When I am using the file location as filewin:/D:/Documents/$FolderName , I could export the document.

       

      Please advise on this how to get rid of this error.

        • 1. Re: File export inside sub folder is not working
          beverly

          Where are you putting this information? If it's in the "Specify Output File" dialog, it cannot resolve the $.../$...

          I will set a single variable ($fullPath) with the calculated path (for example):

           

               "file:/D/Documents/" & $FolderName & "/" & $filepath1

           

          Then in the dialog use the single variable $fullPath.

           

          Also, I don't know if "D" drive will be the default, but you might research the function:

           

               Get(DocumentsPath)

           

          https://www.filemaker.com/help/14/fmp/en/html/func_ref1.32.94.html

           

          beverly

          • 2. Re: File export inside sub folder is not working
            ch0c0halic

            I hope you mean this is in a calculation to construct the URL out of the variables. §^=)

             

            Your Calc(?):

            "filewin:/D:/Documents/" & $FolderName & "/" & $filepath1

             

             

            I would recommend building the path using FMP Functions so it will work anywhere.

             

            Get ( SystemPlatform ) = "-2" ;

            "filewin:" ;

            "filemac:"

            )

            & Get ( DocumentsPath )

            & $FolderName

            & "/" & $filepath1

             

            A couple of caveats:

            1. Don't use spaces in the path or file name. It truncates the URL. Use underlines.

            2. Don't use special characters. They can mess up the OS.

            3. Don't put too many files in a single folder. Over 1024 files starts to slow there OS.

            • 3. Re: File export inside sub folder is not working
              user19752

              Sorry, this is file path, not URL.

              Then first (and maybe second) caveats is not applied to this thread.

              Get() function return spaces in the result as is, so the file path syntax is expected to be able to handle it correctly.

              • 4. Re: File export inside sub folder is not working
                ch0c0halic

                You are right, I meant File Path, not URL.

                 

                While the OS should be able to handle spaces I have found it better to use underscores in names that I enter, since I have control over what's added. Sometimes a space in the path doesn't work as desired. Changing it to a "+" sometimes fixes it. Enclosing the path in quotes fixes it.

                Special characters have also been problematic. The colon, semi-colon, comma, pound, and at-sign may cause an OS to reject the path. I find troubleshooting to go faster if I avoid them.

                 

                I've encountered these problems on Mac's using the Terminal when entering a path so I'm a bit gun-shy and avoid the potential of the issue.

                 

                The Get() function does return the path with spaces. But, using a path with spaces may still cause problems.

                For example: I've had issue when the hard drive name has spaces in it. Change the space to an underscore and the problem disappears.

                • 5. Re: File export inside sub folder is not working
                  user19752

                  I agree to not using special chars are good manner for decreasing troubles, but space is included in default path of FMS installation "FileMaker Server" (and example of function help, just the same case as you wrote, "Macintosh HD"), so if it cause problem, I want to be fixed...

                  • 6. Re: File export inside sub folder is not working
                    user19752

                    The 2 results show that subfolder don't exist.

                    You need to create it before export.